#881: Add personalization variable for torrents creation priority to default processes file.
parent
4f9b004d10
commit
07518803db
|
@ -1,12 +1,17 @@
|
||||||
# RUN_OGADMSERVER defined as OpenGnsys Admin Server
|
# RUN_OGADMSERVER defined as OpenGnsys Admin Server
|
||||||
# RUN_OGADMREPO defined as OpenGnsys Repository Manager
|
# RUN_OGADMREPO defined as OpenGnsys Repository Manager
|
||||||
# RUN_OGADMAGENT run task scheduler service
|
# RUN_OGADMAGENT run task scheduler service (only if Admin Server is enabled)
|
||||||
# RUN_BTTRACKER run Bittorrent Tracker
|
# RUN_BTTRACKER run Bittorrent Tracker (only if Repository is enabled)
|
||||||
# RUN_BTSEEDER start seeding of selected torrent files
|
# RUN_BTSEEDER start seeding of selected torrent files (only if Repository is enabled)
|
||||||
|
# BTSEEDER_PRIORITY nice priority to seed torrent files; recommended values:
|
||||||
|
# 8 for Admin Server or Repo without Torrent
|
||||||
|
# 0 for Admin Server and Repo with Torrent
|
||||||
|
# -8 for Repo with Torrent
|
||||||
# RUN_CRON run Cron script to check started processes
|
# RUN_CRON run Cron script to check started processes
|
||||||
RUN_OGADMSERVER="yes"
|
RUN_OGADMSERVER="yes"
|
||||||
RUN_OGADMREPO="yes"
|
RUN_OGADMREPO="yes"
|
||||||
RUN_OGADMAGENT="yes"
|
RUN_OGADMAGENT="yes"
|
||||||
RUN_BTTRACKER="yes"
|
RUN_BTTRACKER="yes"
|
||||||
RUN_BTSEEDER="yes"
|
RUN_BTSEEDER="yes"
|
||||||
|
BTSEEDER_PRIORITY=0
|
||||||
RUN_CRONJOB="yes"
|
RUN_CRONJOB="yes"
|
||||||
|
|
|
@ -15,6 +15,10 @@ PATH=$PATH:$OPENGNSYS/bin
|
||||||
OGIMG="$OPENGNSYS/images"
|
OGIMG="$OPENGNSYS/images"
|
||||||
REPOCFG="$OPENGNSYS/etc/ogAdmRepo.cfg"
|
REPOCFG="$OPENGNSYS/etc/ogAdmRepo.cfg"
|
||||||
LOGFILE="$OPENGNSYS/log/$PROG.log"
|
LOGFILE="$OPENGNSYS/log/$PROG.log"
|
||||||
|
DEFAULTFILE=/etc/default/opengnsys
|
||||||
|
source $DEFAULTFILE
|
||||||
|
# No hacer nada si no está definido como repositorio.
|
||||||
|
[ "$RUN_OGADMREPO" == "yes" ] || exit 0
|
||||||
# Error si no está bien configurado el repositorio de imágenes.
|
# Error si no está bien configurado el repositorio de imágenes.
|
||||||
[ -d $OGIMG -a -f $REPOCFG ] || exit 1
|
[ -d $OGIMG -a -f $REPOCFG ] || exit 1
|
||||||
source $REPOCFG
|
source $REPOCFG
|
||||||
|
@ -52,7 +56,7 @@ for IMG in *.{img,pgz,diff,dsk} */*.{img,pgz,diff,dsk} ; do
|
||||||
# Datasum completo para transferencias torrent
|
# Datasum completo para transferencias torrent
|
||||||
DATAFULLSUM=$(md5sum -b "$IMG"| cut -f1 -d" ")
|
DATAFULLSUM=$(md5sum -b "$IMG"| cut -f1 -d" ")
|
||||||
echo $DATAFULLSUM > "$SUMFULLFILE"
|
echo $DATAFULLSUM > "$SUMFULLFILE"
|
||||||
nice -8 ctorrent -t "$IMG" -u $TRACKERURL -s "$TORRENT" -c $DATAFULLSUM -l 4194304 2>/dev/null
|
nice -n ${BTSEEDER_PRIORITY:-0} ctorrent -t "$IMG" -u $TRACKERURL -s "$TORRENT" -c $DATAFULLSUM -l 4194304 2>/dev/null
|
||||||
rm -f "$LOCKFILE"
|
rm -f "$LOCKFILE"
|
||||||
if [ -f "$TORRENT" ]; then
|
if [ -f "$TORRENT" ]; then
|
||||||
echo "`date` : Fin creación de fichero $TORRENT" >> $LOGFILE
|
echo "`date` : Fin creación de fichero $TORRENT" >> $LOGFILE
|
||||||
|
|
Loading…
Reference in New Issue