Added the possibility to put a “.forceresurr” file in the main directory to force a run with longer gracetime

This commit is contained in:
pezcurrel 2024-02-26 19:22:20 +01:00
parent c6a0f43aaa
commit 76f64fa519

View file

@ -13,6 +13,7 @@ cd "${basedir}/.."
mycfgfp="../conf/my.conf"
mastcfgfp="../conf/mustard.ini"
mailcfgfp="../conf/mail.conf"
forceresurrfp=".forceresurr"
logfp="maintain.log"
crlogfp="crawler.log"
@ -47,7 +48,7 @@ buff=`ls -1 run/`
[ "${buff}" != "" ] && logcmd "find run/ -type f -exec rm {} ;" "${logfp}"
logcmd "php fedipact.php" "${logfp}"
logcmd "php mustool.php updstats" "${logfp}"
if [ `date "+%d"` != "01" ]; then # usa il gracetime di default
if [ `date "+%d"` != "01" -a ! -f "${forceresurrfp}" ]; then # usa il gracetime di default
log "Eseguo crawler.php con il gracetime di default"
logcmd "php crawler.php" "${crlogfp}"
else # il primo del mese usa un gracetime di 2 mesi