Add a rarpd init script and allow templates to add start-stop-daemon arguments

This commit is contained in:
Roy Marples
2007-11-20 17:10:35 +00:00
parent a12da90fb3
commit 42b057edbe
3 changed files with 57 additions and 0 deletions

View File

@@ -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}"
}