-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtailscale
35 lines (26 loc) · 881 Bytes
/
tailscale
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh /etc/rc.common
# Copyright 2020 Google LLC.
# SPDX-License-Identifier: Apache-2.0
USE_PROCD=1
START=99
STOP=1
start_service() {
procd_open_instance
procd_set_param command /usr/bin/tailscaled
# Set the port to listen on for incoming VPN packets.
# Remote nodes will automatically be informed about the new port number,
# but you might want to configure this in order to set external firewall
# settings.
procd_append_param command --port 41641
# OpenWRT /var is a symlink to /tmp, so write persistent state elsewhere.
procd_append_param command --state /etc/config/tailscaled.state
# Persist files for TLS cert & Taildrop files
procd_append_param command --statedir /etc/tailscale/
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
stop_service() {
/usr/bin/tailscaled --cleanup
}