#!/bin/sh # DrFTPD crontab script ############################################################### First save this file and call it drftpd.chk. Next you will have to add the crontab entry. Type crontab -e. This will open the default text editor with the crontab file. Enter the following (with correct path): */5 * * * * /home/user/drftpd/drftpd.chk >/dev/null 2>&1 The */5 at the beginning means check every 5 minutes. You may replace the 5 with other another number if you want (but less than 60). Save and exit and its installed. ############################################################## ############################################################### # CONFIGURATION ############################################################### # DrFTPD directory DRPATH=/home/drftpd/ # Name of the pid file DRPIDF=master.pid # Name of the executable DRPROG=mastrer.sh # Parameters to pass to the executable DRARGS="" #DRARGS="-debug" ############################################################### # DO NOT EDIT ANYTHING BELOW # ############################################################### PATH=/bin:/usr/bin:/usr/local/bin DRPID= cd $DRPATH if [ -f $DRPIDF ] then DRPID=`cat $DRPIDF` if [ `ps auwx | grep $DRPROG | grep $DRPID | grep -v -c grep` = 1 ] then exit fi rm -f $DRPIDF fi ./$DRPROG $DRARGS