diff --git a/web/clitools/maintain/pcloop.bash b/web/clitools/maintain/pcloop.bash index c34609b..1f04cfe 100755 --- a/web/clitools/maintain/pcloop.bash +++ b/web/clitools/maintain/pcloop.bash @@ -5,22 +5,22 @@ cd "$basedir/.." resurrfp=".pcresurrectdone" cmdlogfp="peerscrawl.log" logfp="pcloop.log" -resdom=26 +resdom=25 # day of month when (or after when, if it has not been done already) to execute peerscrawl.php with a gracetime of 2 months function log { echo `date "+%Y-%m-%d %H:%M:%S.%N"` "${1}" >> "${logfp}" } while true; do dom=$((`date "+%d"`+0)) [ $dom -lt $resdom -a -f "$resurrfp" ] && rm "$resurrfp" - if [[ ($dom -ge $resdom ) && !(-f "$resurrfp") ]]; then # usa un gracetime di 2 mesi + if [[ ($dom -ge $resdom ) && !(-f "$resurrfp") ]]; then # use a gracetime of 2 months touch "$resurrfp" - log "### Eseguo peerscrawl.php con un gracetime di 2 mesi ###" + log "### Starting peerscrawl.php with a 2 months gracetime ###" ./peerscrawl.php -g 2M -e peerscrawl.exclude &> $cmdlogfp - else # use il gracetime di default - log "### Eseguo peerscrawl.php con il gracetime di default ###" + else # use the default gracetime + log "### Starting peerscrawl.php with the default gracetime ###" ./peerscrawl.php -e peerscrawl.exclude &> $cmdlogfp fi tail $cmdlogfp >> $logfp - log "### Fine ###" + log "### THE END ###" done exit 0;