X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=mailtest-check;fp=mailtest-check;h=856d774d32a82995fa93f31efdc17a46e9218ab5;hb=6d1ec26482f86b0f2d9560ce3d04ea8c63297c25;hp=034dfc6b45a7d6c72413fc2a70537fe1ca7d5182;hpb=1689909e66f73f779c4e13458d713a2ef517c9f5;p=distro-setup diff --git a/mailtest-check b/mailtest-check index 034dfc6..856d774 100755 --- a/mailtest-check +++ b/mailtest-check @@ -40,7 +40,7 @@ e() { $int || return 0; printf "mailtest-check: %s\n" "$*"; } getspamdpid() { if [[ ! $spamdpid || ! -d /proc/$spamdpid ]]; then # try twice in case we are restarting, it happens. - for i in 1 2; do + for (( i=0; i<2; i++ )); do spamdpid=$(systemctl show --property MainPID --value spamassassin | sed 's/^[10]$//' ||:) if [[ $spamdpid ]]; then break