2021-06-11 13:20:13 +00:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
2021-07-08 18:39:45 +00:00
|
|
|
set -a
|
2021-06-11 13:20:13 +00:00
|
|
|
source /etc/default/tailscaled
|
2021-07-08 18:39:45 +00:00
|
|
|
set +a
|
2021-06-11 13:20:13 +00:00
|
|
|
|
|
|
|
command="/usr/sbin/tailscaled"
|
|
|
|
command_args="--state=/var/lib/tailscale/tailscaled.state --port=$PORT --socket=/var/run/tailscale/tailscaled.sock $FLAGS"
|
|
|
|
command_background=true
|
|
|
|
pidfile="/run/tailscaled.pid"
|
|
|
|
start_stop_daemon_args="-1 /var/log/tailscaled.log -2 /var/log/tailscaled.log"
|
|
|
|
|
|
|
|
depend() {
|
|
|
|
need net
|
|
|
|
}
|
|
|
|
|
|
|
|
start_pre() {
|
|
|
|
mkdir -p /var/run/tailscale
|
|
|
|
mkdir -p /var/lib/tailscale
|
|
|
|
$command --cleanup
|
|
|
|
}
|
|
|
|
|
|
|
|
stop_post() {
|
|
|
|
$command --cleanup
|
|
|
|
}
|