fi
}
+spamd_ser=spamd
+if systemctl cat spamassassin &>/dev/null; then
+ spamd_ser=spamassassin
+fi
+
pl=/var/log/exim4/paniclog
main() {
jmax="$(date -d @$sec_max "+%F %H:%M:%S")"
description=$(systemctl cat $service | sed -rn 's/^ *Description=(.*)/\1/p')
jrregex="^Starting $description"
- if [[ $service == spamassassin ]]; then
+ if [[ $service == "$spamd_ser" ]]; then
jrregex+="\|^spamd: restarting"
fi
d "jrregex=$jrregex jmin=$jmin jmax=$jmax"
sed -ri "/$regex/d" $pl
fi
fi
- done <<'EOF'
+ done <<EOF
clamav-daemon malware acl condition
-spamassassin spam acl condition
+$spamd_ser spam acl condition
EOF
### end removing panic lines due to service restarts ###
chmod 664 $pl-archive
fi
-if [[ $INVOCATION_ID ]]; then
+if [[ $PPID == 1 ]]; then
loop-main
else
main