Annotation of openbsd/OpenBSDTorrents/runbt.sh, Revision 1.15
1.2 andrew 1: #!/bin/sh
1.15 ! andrew 2: #$RedRiver: runbt.sh,v 1.14 2006/05/15 18:47:04 andrew Exp $
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 \
1.12 andrew 26: --display_interval 600 \
1.15 ! andrew 27: --minport 60881 --maxport 60981 \
! 28: --max_files_open 25 \
1.11 andrew 29: --saveas_style 2 \
30: --save_in ${OBT_DIR_FTP} \
1.13 andrew 31: --torrent_dir ${OBT_DIR_CUR_TORRENT} >> ${LOGFILE}
1.6 andrew 32:
33: echo -n `date` >> ${LOGFILE}
1.7 andrew 34: echo ' Died . . . ' >> ${LOGFILE}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>