done
IFS=$o
fi
+ set -- "$prog" "$@"
+
+ # use setsid to detach from terminal,
+ # needs pidfile or ssd would check setsid program instead of real program
+ if [ "$pidfile" ]; then
+ set -- /usr/bin/setsid "$@"
+ fi
+
/sbin/start-stop-daemon -q --start \
--nicelevel $nice \
${pidfile:+--pidfile $pidfile} \
${fork:+--background} \
${waitname:+--name $waitname} \
${SERVICE_DROPCAPS:+--dropcap $SERVICE_DROPCAPS} \
- --exec "$prog" \
- -- ${1:+"$@"}
+ --exec "$1" \
+ -- "$@"
else
nice -n $nice initlog -c "$prog" 2>&1 </dev/null
fi