Fix bug where killfile never expired

remove some logging
This commit is contained in:
Rob Pearce 2023-12-15 06:29:12 +11:00
parent f7e7c49464
commit ac9addde30
1 changed files with 2 additions and 6 deletions

View File

@ -1745,7 +1745,7 @@ function killfile_active() { # returns true if killfile will stop us
if [[ ! -f ${KILLFILE} ]]; then if [[ ! -f ${KILLFILE} ]]; then
return 1 return 1
fi fi
val=$(cat "${KILLFILE}") val=$(head -1 "${KILLFILE}")
[[ -z $val ]] && return 0 [[ -z $val ]] && return 0
now=$(date +%s) now=$(date +%s)
if [[ $val -le $now ]]; then if [[ $val -le $now ]]; then
@ -2368,11 +2368,7 @@ fi
# Actually run the commands # Actually run the commands
if [[ $DOIT -eq 1 ]]; then if [[ $DOIT -eq 1 ]]; then
if killfile_active; then if ! killfile_active; then
if [[ $cronmode -eq 1 ]]; then
echo -e "${RED}Not running commands because killfile exists ($KILLFILE)${PLAIN}"
fi
else
run_commands run_commands
[[ $cronmode -ne 1 ]] && echo [[ $cronmode -ne 1 ]] && echo