=================================================================== RCS file: /cvs/openbsd/OpenBSDTorrents/regen.sh,v retrieving revision 1.7 retrieving revision 1.11 diff -u -r1.7 -r1.11 --- openbsd/OpenBSDTorrents/regen.sh 2005/06/01 19:19:06 1.7 +++ openbsd/OpenBSDTorrents/regen.sh 2011/03/31 03:31:53 1.11 @@ -1,5 +1,5 @@ #!/bin/sh -#$Id: regen.sh,v 1.7 2005/06/01 18:19:06 andrew Exp $ +#$RedRiver: regen.sh,v 1.10 2010/03/08 20:19:37 andrew Exp $ . /etc/OpenBSDTorrents.conf @@ -10,22 +10,25 @@ PID=`head -1 ${PIDFILE}` kill -0 ${PID} 2> /dev/null if [ $? -eq 0 ]; then - echo Already running + echo $0 Already running exit 1 fi fi echo $$ > ${PIDFILE} if [[ $1 != skip ]]; then + echo echo ${OBT_DIR_HOME}/MakeTorrents.pl $* ${OBT_DIR_HOME}/MakeTorrents.pl $* fi +echo echo ${OBT_DIR_HOME}/CurrentTorrents.pl ${OBT_DIR_HOME}/CurrentTorrents.pl #if [ $? != 253 ]; then exit; fi +echo echo Removing old torrents for f in `ls ${OBT_DIR_CUR_TORRENT}`; do if [ ! -e ${OBT_DIR_TORRENT}/$f ]; then @@ -33,14 +36,22 @@ fi done +echo echo ${OBT_DIR_HOME}/ServerTorrents.pl ${OBT_DIR_HOME}/ServerTorrents.pl -echo lftp -f ${OBT_DIR_HOME}/lftp.script -lftp -f ${OBT_DIR_HOME}/lftp.script +echo +echo lftp torrents to ${OBT_FTP_SERVER} +lftp -c "set ftp:ssl-allow no + open ftp://${OBT_FTP_USER}:${OBT_FTP_PASS}@${OBT_FTP_SERVER} + cd active + mirror -R -r -a -e /home/torrentsync/torrents/. + cd / + mirror -R -r -a /home/torrentsync/torrents/." sleep 60; +echo echo Starting new torrents for f in `ls ${OBT_DIR_TORRENT}`; do if [ ! -e ${OBT_DIR_CUR_TORRENT}/$f ]; then