M7350/webserver/start_webserver
2024-09-09 08:52:07 +00:00

28 lines
443 B
Bash

#! /bin/sh
set -e
case "$1" in
start)
echo -n "Starting webserver: "
#webserver will drop root priviledges after binding
start-stop-daemon -S -b -a /bin/webserver
echo "done"
;;
stop)
echo -n "Stopping webserver: "
start-stop-daemon -K -n webserver
echo "done"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage webserver { start | stop | restart }" >&2
exit 1
;;
esac
exit 0