init.d: sysv do not hide error messages from daemons. remove start-stop-daemon

This commit is contained in:
bol-van 2024-11-13 14:23:47 +03:00
parent 611292281c
commit a85a0f19da

View File

@ -169,13 +169,10 @@ run_daemon()
local DAEMONBASE="$(basename "$2")"
local PIDFILE=$PIDDIR/$DAEMONBASE$1.pid
echo "Starting daemon $1: $2 $3"
if exists start-stop-daemon ; then
start-stop-daemon -S -p "$PIDFILE" -m -b -x "$2" -- $3
else
if [ -f "$PIDFILE" ] && pgrep -F "$PIDFILE" "$DAEMONBASE" >/dev/null; then
echo already running
else
"$2" $3 >/dev/null 2>/dev/null &
"$2" $3 >/dev/null &
PID=$!
if [ -n "$PID" ]; then
echo $PID >$PIDFILE
@ -184,7 +181,6 @@ run_daemon()
false
fi
fi
fi
}
stop_daemon()
{