#!/bin/sh # rc.mod has to "load" before rc.net is allowed to "start"/"stop" [ ! -e /tmp/.websrvload -a -n "$1" -a "$1" != "load" ] && exit DAEMON=websrv DAEMON_BIN=httpd-$DAEMON DAEMON_LONG_NAME="AVM webinterface" PID_FILE=/var/run/websrv.pid CONF_NAME=avm CONF_ENABLED=AVM_WEBSRV . /etc/init.d/modlibrc VERBOSE_RC_CONF=n . /etc/init.d/rc.conf start() { modlib_startdaemon $DAEMON -P "$PID_FILE" } case $1 in ""|load) touch /tmp/.websrvload modlib_add_httpd_symlink $DAEMON modreg daemon -p avm $DAEMON modlib_start $AVM_WEBSRV ;; unload) modlib_stop modunreg daemon avm $DAEMON ;; start) modlib_start ;; stop|kill) modlib_stop ;; restart) modlib_restart ;; status) modlib_status ;; *) echo "Usage: $0 [load|unload|start|stop|restart|status]" 1>&2 exit 1 ;; esac exit 0