Commit fc736a9c authored by nextime's avatar nextime

Fix wssshd init script: use --output option to redirect stdout and stderr to log file

Use start-stop-daemon --output option to properly redirect both stdout and stderr
to /var/log/wssshd/wssshd.log while preserving correct PID storage in the PID file
parent 1f6b7f9d
...@@ -87,7 +87,7 @@ start() { ...@@ -87,7 +87,7 @@ start() {
echo "Starting daemon..." echo "Starting daemon..."
if start-stop-daemon --start --quiet --pidfile "$PIDFILE" \ if start-stop-daemon --start --quiet --pidfile "$PIDFILE" \
--chuid $USER:$GROUP --background --make-pidfile \ --chuid $USER:$GROUP --background --make-pidfile \
--exec "$DAEMON" --stdout /var/log/wssshd/wssshd.log --stderr /var/log/wssshd/wssshd.log; then --exec "$DAEMON" --output /var/log/wssshd/wssshd.log; then
echo "Daemon started successfully" echo "Daemon started successfully"
else else
echo "start-stop-daemon failed, trying direct execution..." echo "start-stop-daemon failed, trying direct execution..."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment