aboutsummaryrefslogtreecommitdiffstats
path: root/testing/headscale/headscale.initd
diff options
context:
space:
mode:
Diffstat (limited to 'testing/headscale/headscale.initd')
-rw-r--r--testing/headscale/headscale.initd25
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/headscale/headscale.initd b/testing/headscale/headscale.initd
new file mode 100644
index 00000000000..9062a6b73a5
--- /dev/null
+++ b/testing/headscale/headscale.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+
+supervisor=supervise-daemon
+
+command="/usr/bin/headscale"
+command_args="serve"
+command_user="headscale:headscale"
+directory="/var/lib/headscale"
+
+output_log="/var/log/headscale.log"
+error_log="/var/log/headscale.log"
+
+depend() {
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath -d -m 755 -o "headscale:headscale" /var/run/headscale
+ checkpath -d -m 755 -o "headscale:headscale" /var/lib/headscale
+
+ checkpath -f -m 644 -o "headscale:headscale" /var/lib/headscale/db.sqlite
+ checkpath -f -m 644 -o "headscale:headscale" /etc/headscale/config.yaml
+ checkpath -f -m 644 -o "headscale:headscale" /var/log/headscale.log
+}