stop returning 1. use pipefail if needed
[log-quiet] / sysd-mail-once
index a7840aad763463c93d5cb960b7c94092c00015f7..6e6807686a43c3e7f78a6c93b556533da9e8c02a 100755 (executable)
@@ -18,7 +18,7 @@ set -eE -o pipefail
 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 
 errors=3
-cbase=/var/local/cron-errors
+cbase=$HOME/sysd-mail-once-state
 case "$1" in
     -h|--help)
         cat <<EOF
@@ -61,7 +61,7 @@ if "$@"; then
             echo | mail -s "$HOSTNAME: $service success" $u@localhost
         fi
     fi
-else
+else # $@ failed
     if [[ $file ]]; then
         i=${file#$c}
         if (( i < errors )); then