mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
a19eea965f
This adapts the existing in-process logcatcher from tstest/integration into a public type and uses it on the side of testcontrol. This also fixes a bug in the Alpine Linux OpenRC unit that makes every value in `/etc/default/tailscaled` exported into tailscaled's environment, a-la systemd [Service].EnviromentFile. Signed-off-by: Christine Dodrill <xe@tailscale.com>
26 lines
524 B
Plaintext
Executable File
26 lines
524 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
set -a
|
|
source /etc/default/tailscaled
|
|
set +a
|
|
|
|
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
|
|
}
|