[BACK]Return to runbt.sh CVS log [TXT][DIR] Up to [local] / openbsd / OpenBSDTorrents

Annotation of openbsd/OpenBSDTorrents/runbt.sh, Revision 1.11

1.2       andrew      1: #!/bin/sh
1.11    ! andrew      2: #$Id: runbt.sh,v 1.10 2005/05/18 00:17:12 andrew Exp andrew $
1.2       andrew      3:
1.10      andrew      4: . /etc/OpenBSDTorrents.conf
                      5: LOGFILE=/home/torrentseeder/runbt.log
1.6       andrew      6:
1.10      andrew      7: cd ${OBT_DIR_HOME}
                      8: PIDFILE=${OBT_DIR_HOME}/run/runbt.pid
                      9:
                     10: if [ -e ${PIDFILE} ]; then
                     11:         PID=`head -1 ${PIDFILE}`
                     12:         kill -0 ${PID} 2> /dev/null
                     13:         if [ $? -eq 0 ]; then
                     14:                 echo Already running
                     15:                 exit 1
                     16:         fi
                     17: fi
                     18: echo $$ > ${PIDFILE}
                     19:
                     20:
1.6       andrew     21: echo -n `date` >> ${LOGFILE}
1.7       andrew     22: echo ' Starting . . . ' >> ${LOGFILE}
1.6       andrew     23:
1.11    ! andrew     24: nice btlaunchmany \
1.10      andrew     25:     --check_hashes 0 \
                     26:     --display_interval 60 \
                     27:     --minport 6881 --maxport 6989 \
1.9       andrew     28:     --max_files_open 75 \
1.11    ! andrew     29:     --saveas_style 2 \
        !            30:     --save_in ${OBT_DIR_FTP} \
        !            31:     --torrent_dir /home/torrentsync/torrents/ >> ${LOGFILE}
1.6       andrew     32:
                     33: echo -n `date` >> ${LOGFILE}
1.7       andrew     34: echo ' Died . . . ' >> ${LOGFILE}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>