#!/bin/sh # # RC5/DES client startup # # chkconfig: 2345 99 01 # description: RC5/DES cracking client # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -x /home/tknarr/rc5des/dnetc ] || exit 0 [ -f /home/tknarr/rc5des/dnetc.ini ] || exit 0 RETVAL=0 # See how we were called. case "$1" in start) # Start daemons. echo -n "Starting RC5/DES: " curwd=`/bin/pwd` cd /home/tknarr/rc5des su tknarr -c "./dnetc -hide" -s /bin/sh cd $curwd echo touch /var/lock/subsys/distnet ;; stop) # Stop daemons. echo -n "Shutting down RC5/DES: " curwd=`/bin/pwd` cd /home/tknarr/rc5des su tknarr -c "./dnetc -shutdown" -s /bin/sh rm -f /var/lock/subsys/distnet echo ;; status) status dnetc exit 0 ;; restart|reload) $0 stop $0 start exit 0 ;; *) echo "Usage: distnet {start|stop}" exit 1 esac exit $RETVAL