diff options
Diffstat (limited to 'community/nebula/nebula.initd')
-rw-r--r-- | community/nebula/nebula.initd | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/community/nebula/nebula.initd b/community/nebula/nebula.initd index bb1ece4851a..3fa81bd7524 100644 --- a/community/nebula/nebula.initd +++ b/community/nebula/nebula.initd @@ -1,19 +1,25 @@ #!/sbin/openrc-run -name=$RC_SVCNAME +name="Nebula Networking" description="Scalable overlay networking tool" -cfgfile="/etc/$RC_SVCNAME/config.yml" -command="/usr/sbin/$RC_SVCNAME" + +instance=${RC_SVCNAME##*.} +cfgfile="/etc/nebula/${instance:-config}.yml" +command="/usr/sbin/nebula" command_args="-config $cfgfile" -command_user="$RC_SVCNAME" +command_user="nebula" supervisor="supervise-daemon" +capabilities="^cap_net_admin" +output_log="/var/log/${RC_SVCNAME}.log" +error_log="/var/log/${RC_SVCNAME}.log" depend() { need net use logger dns after firewall - provide nebula } 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" } |