#!/bin/bash # # $Id: sudoscriptd.linux.init,v 1.3 2002/12/16 21:29:24 hbo Exp $ # Init file for sudoscriptd server daemon # # chkconfig: 2345 98 02 # description: sudoshell logging daemon # # processname: sudoscriptd # pidfile: /var/run/sudoscriptd.pid # source function library . /etc/rc.d/init.d/functions RETVAL=0 prog="sudoscriptd" OPTS= #OPTS="--datefmt sortable" SUDOSCRIPTD=/usr/sbin/sudoscriptd start() { echo -n $"Starting $prog:" initlog -c "$SUDOSCRIPTD" $OPTS && success || failure RETVAL=$? [ "$RETVAL" = 0 ] && touch /var/lock/subsys/sudoscriptd echo } stop() { echo -n $"Stopping $prog:" killproc $SUDOSCRIPTD -HUP RETVAL=$? [ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/susoscriptd echo } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; status) status $SUDOSCRIPTD RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|status}" RETVAL=1 esac exit $RETVAL