From 42b057edbe7608712446700df3a72da4c208fc78 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 20 Nov 2007 17:10:35 +0000 Subject: Add a rarpd init script and allow templates to add start-stop-daemon arguments --- sh/runscript.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sh') 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}" } -- cgit v1.2.3