=================================================================== RCS file: /cvs/openbsd/OpenBSDTorrents/runbt.sh,v retrieving revision 1.7 retrieving revision 1.11 diff -u -r1.7 -r1.11 --- openbsd/OpenBSDTorrents/runbt.sh 2005/03/28 23:52:33 1.7 +++ openbsd/OpenBSDTorrents/runbt.sh 2005/05/18 02:22:47 1.11 @@ -1,18 +1,34 @@ #!/bin/sh -#$Id: runbt.sh,v 1.7 2005/03/28 23:52:33 andrew Exp $ +#$Id: runbt.sh,v 1.11 2005/05/18 01:22:47 andrew Exp $ -LOGFILE=runbt.log +. /etc/OpenBSDTorrents.conf +LOGFILE=/home/torrentseeder/runbt.log +cd ${OBT_DIR_HOME} +PIDFILE=${OBT_DIR_HOME}/run/runbt.pid + +if [ -e ${PIDFILE} ]; then + PID=`head -1 ${PIDFILE}` + kill -0 ${PID} 2> /dev/null + if [ $? -eq 0 ]; then + echo Already running + exit 1 + fi +fi +echo $$ > ${PIDFILE} + + echo -n `date` >> ${LOGFILE} echo ' Starting . . . ' >> ${LOGFILE} -btlaunchmany.py \ - --super_seeder 1 \ - --minport 10000 --maxport 10500 \ - --saveas /home/ftp/pub/ --saveas_style 2 \ - /home/torrentsync/torrents/ > /dev/null +nice btlaunchmany \ + --check_hashes 0 \ + --display_interval 60 \ + --minport 6881 --maxport 6989 \ + --max_files_open 75 \ + --saveas_style 2 \ + --save_in ${OBT_DIR_FTP} \ + --torrent_dir /home/torrentsync/torrents/ >> ${LOGFILE} echo -n `date` >> ${LOGFILE} echo ' Died . . . ' >> ${LOGFILE} - -/home/OpenBSDTorrents/OpenBSDTorrents/runbt.sh &