1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-22 18:55:29 +03:00
aports/community/nebula/nebula.initd

24 lines
581 B
Text
Executable file

#!/sbin/openrc-run
name="Nebula Networking"
description="Scalable overlay networking tool"
instance=${RC_SVCNAME##*.}
cfgfile="/etc/nebula/${instance:-config}.yml"
command="/usr/sbin/nebula"
command_args="-config $cfgfile"
command_user="nebula"
supervisor="supervise-daemon"
output_log="/var/log/${RC_SVCNAME}.log"
error_log="/var/log/${RC_SVCNAME}.log"
depend() {
need net
use logger dns
after firewall
}
start_pre() {
$command -config $cfgfile -test
checkpath -f -m 0644 -o "$command_user" "$output_log" "$error_log"
checkpath -f -m 0640 -o "$command_user" "$cfgfile"
}