# A function to start a program (now it's useful on read-only filesystem too)
daemon() {
- local errors="" prog="" end="" waitname="" waittime=""
+ local errors="" prog="" end="" waitname="" waittime=0
local exit_code=0
local nice=$SERVICE_RUN_NICE_LEVEL
local fork user closefds redirfds pidfile makepid chdir=/
for p in $(< "${pidfile}"); do
[ -z "$(echo "$p" | awk '{gsub(/[0-9]/,"");print;}')" ] && pid="$pid $p"
done
+ else
+ unset pidfile
fi
# Next try "pidof" if pidfile is not specified