sed -i "/$regex/d" $pl
fi
+ # this is a strange message due to running as nonroot
+ # regex='exim user lost privilege for using -C option'
+ # sed -i "/$regex/d" $pl
+
# seems to randomly be caused by
# Starting exim4-base housekeeping, exim4-base.service
regex="^[^ ]* 00:00:0.* Failed writing transport results to pipe: Broken pipe$"
EOF
}
-if [[ $INVOCATION_ID ]]; then
- # this is to prevent systemd from filling up the journal
- for (( runcount=0; runcount < 100; runcount++ )); do
+loop-main() {
+ while true; do
main
sleep 30
done
+}
+
+if [[ $INVOCATION_ID ]]; then
+ loop-main
else
main
fi