Files
buildroot/package/ssdp-responder/S50ssdpd
Peter Seiderer 0687bdeaae package/ssdp-responder: update S50ssdpd (move shellcheck comment)
- S50ssdpd: move shellcheck comment to the line where needed

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2026-01-06 22:53:56 +01:00

50 lines
749 B
Bash

#!/bin/sh
DAEMON=ssdpd
PIDFILE=/var/run/$DAEMON.pid
CFGFILE=/etc/default/$DAEMON
DAEMON_ARGS=""
# Read configuration variable file if it is present
# shellcheck source=/dev/null
[ -r "$CFGFILE" ] && . "$CFGFILE"
start() {
printf 'Starting %s: ' "$DAEMON"
# shellcheck disable=SC2086 # we need the word splitting
if start-stop-daemon -S -q -p "$PIDFILE" -x "$DAEMON" -- $DAEMON_ARGS; then
echo "OK"
else
echo "FAIL"
fi
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
if start-stop-daemon -K -q -p "$PIDFILE" -x "$DAEMON"; then
echo "OK"
else
echo "FAIL"
fi
}
restart() {
stop
start
}
case "$1" in
start|stop|restart)
"$1"
;;
reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac
exit $?