1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/n2n/edge.initd
2021-06-15 06:47:35 +00:00

29 lines
633 B
Text

#!/sbin/openrc-run
name=edge
description="N2N Edge Daemon"
instance=${RC_SVCNAME##*.}
[ -n "$instance" ] && : ${cfgfile:=/etc/n2n/edge-$instance.conf}
: ${cfgfile:=/etc/n2n/edge.conf}
command="/usr/sbin/edge"
command_args="$cfgfile ${command_opts}"
command_args_foreground="-f"
supervisor="supervise-daemon"
pidfile="/run/$name.pid"
output_log="/var/log/${RC_SVCNAME}.log"
error_log="/var/log/${RC_SVCNAME}.log"
retry="${EDGE_RETRY:-TERM/60/KILL/10}"
depend() {
need net
after firewall
}
start_pre() {
checkpath -f -m 0644 -o "$command_user" "$output_log" "$error_log"
checkpath -f -m 0640 -o "$command_user" "$cfgfile"
}