diff options
author | Roy Marples <roy@marples.name> | 2007-11-20 17:10:35 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-11-20 17:10:35 +0000 |
commit | 42b057edbe7608712446700df3a72da4c208fc78 (patch) | |
tree | 10f4ffa12f82da7b57a27b6c13fd02a2ac7c1001 /sh | |
parent | a12da90fb324fa5d88e4cc753ffcf680b70251b3 (diff) |
Add a rarpd init script and allow templates to add start-stop-daemon arguments
Diffstat (limited to 'sh')
-rwxr-xr-x | sh/runscript.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sh/runscript.sh b/sh/runscript.sh index 6e711304..e5eb5c22 100755 --- a/sh/runscript.sh +++ b/sh/runscript.sh @@ -95,10 +95,16 @@ if [ -n "${command}" ]; then if ! type start >/dev/null 2>&1; then start() { ebegin "Starting ${name:-${SVCNAME}}" + case "${command_background}" in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + start_stop_daemon_args="${start_stop_daemon_args} --background --pidfile" + ;; + esac start-stop-daemon --start \ --exec ${command} \ ${procname:+--name} ${procname} \ ${pidfile:+--pidfile} ${pidfile} \ + ${start_stop_daemon_args} \ -- ${command_args} eend $? "Failed to start ${SVCNAME}" } |