Fichiers
wyze-firmware/SD_ROOT/wz_mini/etc/network.d/S10httpd
T
2022-08-05 19:37:32 -07:00

33 lignes
485 B
Bash

#!/bin/sh
### BEGIN INIT INFO
# Provides:
# Short-Description: Basic Web Server
# Description: If enabled, start the httpd web server
### END INIT INFO
. /opt/wz_mini/wz_mini.conf
case "$1" in
start)
echo "#####$(basename "$0")#####"
if [[ "$WEB_SERVER_ENABLED" == "true" ]]; then
httpd -p 80 -h /opt/wz_mini/www
echo "httpd enabled"
fi
;;
stop)
pkill dnsmasq
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac