#!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 opts="depend checkconfig start stop" depend() { need net } checkconfig() { if [[ ! -f $DAEMON ]] ; then ewarn "Unable to find $DAEMON" return 1 fi if [[ ! -f $CONF ]] ; then ewarn $CONF " does not exist." return 1 fi } start() { checkconfig || return 1 ebegin "Starting ocsigen" $DAEMON --daemon --pidfile $PIDFILE $OCSIGEN_OPTS eend $? } stop() { ebegin "Stopping ocsigen" for pid in `cat $PIDFILE`; do kill $pid || true; done rm -f $PIDFILE eend $? }