aboutsummaryrefslogtreecommitdiffstats
path: root/community/nebula/nebula.initd
diff options
context:
space:
mode:
Diffstat (limited to 'community/nebula/nebula.initd')
-rwxr-xr-x[-rw-r--r--]community/nebula/nebula.initd15
1 files changed, 10 insertions, 5 deletions
diff --git a/community/nebula/nebula.initd b/community/nebula/nebula.initd
index bb1ece4851..2845169957 100644..100755
--- a/community/nebula/nebula.initd
+++ b/community/nebula/nebula.initd
@@ -1,19 +1,24 @@
#!/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"
+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"
}