package/openssh: tidy up init script

* Use long options for start-stop-daemon

* Avoid --quiet, except for reload where the "stopping" message could
  be confusing

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Fiona Klute (WIWA)
2024-07-12 14:49:54 +02:00
committed by Thomas Petazzoni
parent 02d8e072d1
commit 1f743f4004

View File

@@ -16,8 +16,8 @@ start() {
/usr/bin/ssh-keygen -A
printf "Starting %s: " "$DAEMON"
start-stop-daemon -S -q -p "$PIDFILE" \
-x "/usr/sbin/$DAEMON"
start-stop-daemon --start --pidfile "$PIDFILE" \
--exec "/usr/sbin/$DAEMON"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
@@ -29,8 +29,8 @@ start() {
stop() {
printf "Stopping sshd: "
start-stop-daemon -K -q -p "$PIDFILE" \
-x "/usr/sbin/$DAEMON"
start-stop-daemon --stop --pidfile "$PIDFILE" \
--exec "/usr/sbin/$DAEMON"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
@@ -51,8 +51,8 @@ restart() {
reload() {
printf "Reloading sshd config: "
start-stop-daemon -K --signal HUP -q -p "$PIDFILE" \
-x "/usr/sbin/$DAEMON"
start-stop-daemon --stop --signal HUP -q --pidfile "$PIDFILE" \
--exec "/usr/sbin/$DAEMON"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"