#!/bin/sh DAEMON=ngircd DAEMON_CONFIG=/tmp/flash/$DAEMON/ngircd.conf . /etc/init.d/modlibrc start() { modlib_startdaemon $DAEMON -p -f $DAEMON_CONFIG $NGIRCD_CMDLINE } case $1 in ""|load) [ ! -d "/tmp/flash/$DAEMON" ] && mkdir -p /tmp/flash/$DAEMON [ ! -e "$DAEMON_CONFIG" ] && /etc/default.$DAEMON/ngircd_conf > $DAEMON_CONFIG modreg cgi 'ngircd' 'ngIRCd' modreg daemon $DAEMON modreg file ngircd conf 'config' 1 "ngircd_conf" modlib_start $NGIRCD_ENABLED ;; unload) modunreg file $DAEMON modunreg daemon $DAEMON modunreg cgi $DAEMON 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