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

Diff for /openbsd/OpenBSDTorrents/regen.sh between version 1.6 and 1.9

version 1.6, 2005/05/02 22:49:21 version 1.9, 2010/03/03 18:24:47
Line 1 
Line 1 
 #!/bin/sh  #!/bin/sh
 #$Id$  #$RedRiver: regen.sh,v 1.8 2006/05/15 18:47:04 andrew Exp $
   
 . /etc/OpenBSDTorrents.conf  . /etc/OpenBSDTorrents.conf
   
Line 10 
Line 10 
         PID=`head -1 ${PIDFILE}`          PID=`head -1 ${PIDFILE}`
         kill -0 ${PID} 2> /dev/null          kill -0 ${PID} 2> /dev/null
         if [ $? -eq 0 ]; then          if [ $? -eq 0 ]; then
                 echo Already running                  echo $0 Already running
                 exit 1                  exit 1
         fi          fi
 fi  fi
Line 24 
Line 24 
 echo ${OBT_DIR_HOME}/CurrentTorrents.pl  echo ${OBT_DIR_HOME}/CurrentTorrents.pl
 ${OBT_DIR_HOME}/CurrentTorrents.pl  ${OBT_DIR_HOME}/CurrentTorrents.pl
   
 if [ $? != 253 ]; then  #if [ $? != 253 ]; then exit; fi
         echo lftp -f ${OBT_DIR_HOME}/lftp.script  
         lftp -f ${OBT_DIR_HOME}/lftp.script  
   
         echo ${OBT_DIR_HOME}/ServerTorrents.pl  echo Removing old torrents
         ${OBT_DIR_HOME}/ServerTorrents.pl  for f in `ls ${OBT_DIR_CUR_TORRENT}`; do
 fi          if [ ! -e ${OBT_DIR_TORRENT}/$f ]; then
                   rm ${OBT_DIR_CUR_TORRENT}/$f
           fi
   done
   
   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
   
   sleep 60;
   
   echo Starting new torrents
   for f in `ls ${OBT_DIR_TORRENT}`; do
           if [ ! -e ${OBT_DIR_CUR_TORRENT}/$f ]; then
                   ln -s ${OBT_DIR_TORRENT}/$f ${OBT_DIR_CUR_TORRENT}/$f
           fi
   done

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.9

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