+ service: Adding freebsd arm support
This commit is contained in:
@@ -272,6 +272,8 @@ func configureService(c *service.Config) {
|
||||
// On OpenWrt we're using a different type of sysvScript
|
||||
if util.IsOpenWrt() {
|
||||
c.Option["SysvScript"] = openWrtScript
|
||||
} else if util.IsFreeBSD() {
|
||||
c.Option["SysvScript"] = freeBSDScript
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,3 +495,16 @@ status() {
|
||||
fi
|
||||
}
|
||||
`
|
||||
const freeBSDScript = `#!/bin/sh
|
||||
# PROVIDE: {{.Name}}
|
||||
# REQUIRE: networking
|
||||
# KEYWORD: shutdown
|
||||
. /etc/rc.subr
|
||||
name="{{.Name}}"
|
||||
{{.Name}}_env="IS_DAEMON=1"
|
||||
{{.Name}}_user="root"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-P ${pidfile} -r -f {{.WorkingDirectory}}/{{.Name}}"
|
||||
run_rc_command "$1"
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user