#!/bin/sh ### BEGIN INIT INFO # Provides: svnd # Required-Start: $syslog $remote_fs # Should-Start: $time ypbind sendmail # Required-Stop: $syslog $remote_fs # Should-Stop: $time ypbind sendmail # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: The daemon # Description: a cool daemon ### END INIT INFO # chkconfig: 345 99 00 # description: a cool daemon DAEMON="/tmp/minid.pl" PARA=" " . /lib/lsb/init-functions case "$1" in start) echo -n "Starting $DAEMON " start_daemon $DAEMON $PARA RETVAL=$? ;; stop) echo -n "Shutting down $DAEMON " killproc $DAEMON -TERM RETVAL=$? ;; restart) $0 stop $0 start ;; status) echo -n "Checking for service $DAEMON " pidofproc $DAEMON 2>&1 >/dev/null RETVAL=$? ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac if [ "x$RETVAL" = "x0" ] ; then log_success_msg else log_failure_msg fi