#!/bin/sh DAEMON=dtmfbox-cgi DAEMON_BIN=httpd-$DAEMON DAEMON_LONG_NAME="dtmfbox webinterface" DAEMON_CONFIG=/mod/etc/httpd-${DAEMON}.conf PID_FILE=/var/run/webcfg-${DAEMON}.pid . /etc/init.d/modlibrc config() { modlib_config httpd-${DAEMON} } start() { modlib_startdaemon webcfg-dtmfbox-cgi -P "$PID_FILE" } case $1 in ""|load) modlib_add_httpd_symlink $DAEMON modreg cgi 'dtmfbox-cgi' 'dtmfbox' modreg daemon $DAEMON modlib_start $DTMFBOXCGI_ENABLED ;; unload) modunreg daemon $DAEMON modunreg cgi 'dtmfbox-cgi' modlib_stop ;; start) modlib_start ;; stop) modlib_stop ;; restart) modlib_restart ;; status) modlib_status ;; *) echo "Usage: $0 [load|unload|start|stop|restart|status]" 1>&2 exit 1 ;; esac exit 0