blob: ef76ad085ed04ef1a2ff16064a31bdf9147c6923 (
plain)
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
|
#!/sbin/openrc-run
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
. /etc/default/derper
name="derper"
description="Tailscale DERP server"
command="/usr/bin/derper"
command_args=" \
-certdir ${CERTDIR} \
-certmode ${CERTMODE} \
-hostname ${HOSTNAME} \
-a ${ADDR} \
-http-port ${HTTP_PORT} \
-c '${HOMEDIR}'/derper.key \
${FLAGS}
"
command_user="${DERPER_USER}:${DERPER_GROUP}"
command_background=true
pidfile="/run/derper.pid"
directory="${HOMEDIR}"
output_log="/var/log/derper/derper.log"
error_log="/var/log/derper/derper.error"
depend() {
need net
}
start_pre() {
checkpath -d -m 700 -o ${command_user} /var/log/derper
checkpath -d -m 750 -o ${command_user} ${HOMEDIR}
/usr/libexec/derper-pre.sh
}
|