From 89a82089853b78dd54d0b6c7f1d8d9ae03beb56e Mon Sep 17 00:00:00 2001 From: ramon Date: Mon, 23 Apr 2012 12:22:28 +0000 Subject: Versión 1.0.4, #414: Pequeñas correcciones en scripts ejecutados por Cron. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://opengnsys.es/svn/branches/version1.0@2981 a21b9725-9963-47de-94b9-378ad31fedc9 --- repoman/bin/opengnsys.cron | 1 + repoman/bin/torrent-creator | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'repoman') 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 -- cgit v1.2.3-18-g5258