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