diff options
-rwxr-xr-x | repoman/bin/opengnsys.cron | 1 | ||||
-rwxr-xr-x | repoman/bin/torrent-creator | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/repoman/bin/opengnsys.cron b/repoman/bin/opengnsys.cron index db517fbd..76236f73 100755 --- a/repoman/bin/opengnsys.cron +++ b/repoman/bin/opengnsys.cron @@ -1,3 +1,4 @@ +#!/bin/bash # Comprobamos si los servicios de opengnsys están levantado y si no es así los iniciamos. # Variables. OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} diff --git a/repoman/bin/torrent-creator b/repoman/bin/torrent-creator index 21d58581..fe5aebf3 100755 --- a/repoman/bin/torrent-creator +++ b/repoman/bin/torrent-creator @@ -36,7 +36,7 @@ for IMG in *.{img,pgz}; do SUMFILE="$IMG.sum" if [ -f "$TORRENT" ]; then FILESIZE="$(ls -l $IMG | awk '{print $5}')" - read -e TORRFILE TORRSIZE <<<"$(ctorrent -x $TORRENT | awk '$1~/<1>/ {print $2,$3}')" + read -e TORRFILE TORRSIZE <<<"$(ctorrent -x $TORRENT 2>/dev/null | awk '$1~/<1>/ {print $2,$3}')" [ "$(basename $IMG)" = "$TORRFILE" -a "[$FILESIZE]" = "$TORRSIZE" ] && continue fi # Bloquear imagen, crear ficheros Torrent y Checksum y desbloquear imagen. @@ -46,7 +46,7 @@ for IMG in *.{img,pgz}; do rm -f "$TORRENT" "$SUMFILE" DATASUM=`md5sum "$IMG" | cut -f1 -d" "` echo $DATASUM > "$SUMFILE" - nice -8 ctorrent -t "$IMG" -u $TRACKERURL -s "$TORRENT" -c $DATASUM + nice -8 ctorrent -t "$IMG" -u $TRACKERURL -s "$TORRENT" -c $DATASUM 2>/dev/null rm -f "$LOCKFILE" if [ -f "$TORRENT" ]; then echo "`date` : Fin creación de fichero $TORRENT" >> $LOGFILE |