Comments (5)
Hey @slhck the autoupdate is meant to check at the next reboot. (/tmp does not persist on reboots, ramfs/tmpfs)
If you want to upgrade in place, it can be done. Stop the service using /etc/init.d/tailscale stop
, kill
any running tailscaled processes, rm -f /tmp/tailscale*
and then start the service back using /etc/init.d/tailscale start
. Should download the new one.
Did you have any ideas on how it could be better achieved?
from openwrt-tailscale-enabler.
Thanks for the explanation.
I guess rebooting is not a common task — for me at least.
Do you know if it is possible to update in-place like the Ubuntu packages for Tailscale are doing it? Automatically reinstating the connection, that is.
I don't have an easy solution for the time being. Ideally the new binaries would be downloaded asynchronously and replaced after being extracted, then triggering a restart of the service.
from openwrt-tailscale-enabler.
A service restart should still reconnect you to the network. Maybe the init system can handle the upgrades using an upgrade command? Not sure, need to explore.
from openwrt-tailscale-enabler.
I looked into the Ubuntu packages and it seems that all that is done is reloading the service in the postinst
file:
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
deb-systemd-helper unmask 'tailscaled.service' >/dev/null || true
if deb-systemd-helper --quiet was-enabled 'tailscaled.service'; then
deb-systemd-helper enable 'tailscaled.service' >/dev/null || true
else
deb-systemd-helper update-state 'tailscaled.service' >/dev/null || true
fi
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
deb-systemd-invoke start 'tailscaled.service' >/dev/null || true
fi
fi
The systemd service itself has a cleanup action in addition to what you have in your package now; not sure if that is needed:
[Unit]
Description=Tailscale node agent
Documentation=https://tailscale.com/kb/
Wants=network-pre.target
After=network-pre.target NetworkManager.service systemd-resolved.service
[Service]
EnvironmentFile=/etc/default/tailscaled
ExecStartPre=/usr/sbin/tailscaled --cleanup
ExecStart=/usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port $PORT $FLAGS
ExecStopPost=/usr/sbin/tailscaled --cleanup
Restart=on-failure
RuntimeDirectory=tailscale
RuntimeDirectoryMode=0755
StateDirectory=tailscale
StateDirectoryMode=0700
CacheDirectory=tailscale
CacheDirectoryMode=0750
Type=notify
[Install]
WantedBy=multi-user.target
But the tailscale
client can't be restarted so easily, right? I wonder how that is done.
from openwrt-tailscale-enabler.
The postinst
makes extensive use of systemd specific stuff which wont work in openwrt's init system. Translating this is the main task.
tailscale
client is a run and die binary. Just deleting the /tmp/tailscale
file causes the next download to use the latest binary available. The tailscaled
is the only one that needs action since it runs as a daemon.
from openwrt-tailscale-enabler.
Related Issues (20)
- Binary path change HOT 1
- Installation hangs while writing to stdout HOT 5
- failed to connect to local tailscaled; it doesn't appear to be running (sudo systemctl start tailscaled ?) HOT 3
- tailscale cert error HOT 4
- How do i uninstall it? HOT 1
- Disable auto-update HOT 3
- Headscale not able to access automatically HOT 3
- Unable to establish SSL connection when "tailscale up" HOT 2
- how to Uninstall tailscale on openwrt HOT 1
- can not up,when wget HOT 6
- it's keep downloading tailscale HOT 1
- Step error HOT 2
- Everytime reboot openwrt, tailscale can't work HOT 5
- Unusual use after openwrt restart HOT 3
- bug HOT 3
- requests & bug: stable version for architectures are differents
- unable to start the service, due to update probably
- Kenapa downloadingnya ke versi tailscale 1.52.1 ? padahal sy instal tgz dari link update terbaru ? HOT 1
- Can't install Tailscale - init.d permissions & bin/tailscaled - read-only HOT 2
- how to fix the client version != server version HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openwrt-tailscale-enabler.