28-06-2019, 02:22 PM
muchas gracias Ganekogorta, ayer lo probé. y funciona de lujo, he realizado varias pruebas metiendo alguna archivo nuevo y como tu indicas cada x tiempo revisa la carpeta y me manda un email con lo nuevo que se ha agregado.
al final cambie la orden de contrab como tu me dijiste.
creo que así esta correctamente escrita verdad?
otra cosa mas, ayer mirando las carpetas que genera Rtorrent he encante una llamada script y dentro habia este, no controlo mucho de programación te lo pego aquí para que le eches un ojo.
al final cambie la orden de contrab como tu me dijiste.
Cita:/30 * * * * /bin/bash /share/CACHEDEV1_DATA/Script/cambios.sh
creo que así esta correctamente escrita verdad?
otra cosa mas, ayer mirando las carpetas que genera Rtorrent he encante una llamada script y dentro habia este, no controlo mucho de programación te lo pego aquí para que le eches un ojo.
Cita:#!/bin/sh
# rTorrent event script handler
#
# Script launcher. DO NOT MODIFY!
#
# Usage:
# a) In the directory: /share/Rdownload/sh-script
# create file named: finished-*.sh
#
# (eg. finished-sendmail.sh)
#
# b) set executables permissions:
# # chmod a+x -R /share/Rdownload/sh-script/*.sh
#
DIR="/share/Rdownload/sh-script"
FILES="${DIR}/finished*.sh"
if [ ! -d "$DIR" ]; then
echo "Directory $DIR not exist."
exit 0
fi
if [ -z "$3" ]; then
cat <<-EOF
Missing arguments. Syntax:
# $(basename $0) <hash> <name> <path> [label]
Arguments:
hash - torrent infohash
name - torrent name
path - torrent data path
Optional arguments:
label - torrent label
EOF
exit 0
fi
# Call custom handler scripts
for i in $FILES
do
echo Execute: $i $@
test ! -x "$i" || "$i" "$@" >> $DIR/log
done
# important status exit otherwise will break other executions
exit 0