Enable HTTPD

pull/62/head
Igor Zalatov (from Citadel PC) 2021-10-08 21:30:09 +03:00
parent c63d37d5f8
commit 38df572bba
3 changed files with 66 additions and 2 deletions

View File

@ -71,8 +71,8 @@ BR2_PACKAGE_MBEDTLS_OPENIPC=y
# BR2_PACKAGE_MBEDTLS_OPENIPC_COMPRESSION is not set
# BR2_PACKAGE_MINI_SNMPD is not set
BR2_PACKAGE_MOTORS=y
# BR2_PACKAGE_OPUS_OPENIPC is not set
# BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT is not set
BR2_PACKAGE_OPUS_OPENIPC=y
BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y
# BR2_PACKAGE_SSHPASS is not set
BR2_PACKAGE_UACME_OPENIPC=y
BR2_PACKAGE_VTUND_OPENIPC=y

View File

@ -0,0 +1,7 @@
#
H:/var/www
A:127.0.0.1
A:*
D:8.8.8.8/32
/cgi-bin:admin:12345
#

View File

@ -0,0 +1,57 @@
#!/bin/sh
DAEMON="httpd"
PIDFILE="/var/run/$DAEMON.pid"
HTTPD_ARGS="httpd -p 85 -f -c /etc/httpd.conf -r Authentication"
# shellcheck source=/dev/null
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
# The httpd does not create a pidfile, so pass "-n" in the command line
# and use "-m" to instruct start-stop-daemon to create one.
start() {
printf 'Starting %s: ' "$DAEMON"
[ -f /usr/sbin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" \
-- $HTTPD_ARGS
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
[ -f /usr/sbin/$DAEMON ] || echo -en "DISABLED, "
start-stop-daemon -K -q -p "$PIDFILE"
status=$?
if [ "$status" -eq 0 ]; then
rm -f "$PIDFILE"
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
sleep 1
start
}
case "$1" in
start|stop|restart)
"$1";;
reload)
# Restart, since there is no true "reload" feature.
restart;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac