generated from me/template-mit
Remove sleeping for 10 seconds at the end of the loop since we're much more precise now. Only sleep for 5 minutes after notification dismissal if we're planning another one.
This commit is contained in:
1 parent
5fd554e7d5
commit
177bcafe95
1 file changed
+5
-6
+5
-6
@@ -229,10 +229,11 @@ while true; do
|
|||||||
echo "Alert time has been reached, show message."
|
echo "Alert time has been reached, show message."
|
||||||
show_alert
|
show_alert
|
||||||
NOTIFIED="true"
|
NOTIFIED="true"
|
||||||
|
echo "Alert has been dismissed."
|
||||||
echo "Alert has been dismissed, sleeping for 5 minutes."
|
if [[ -n "$PERSIST" ]]; then
|
||||||
sleep 290
|
echo "Sleeping for 5 minutes before next notification."
|
||||||
echo "Waking back up from notification dismissal."
|
sleep 300
|
||||||
|
fi
|
||||||
elif [[ "$SUNSET_EPOCH" == 0 ]]; then
|
elif [[ "$SUNSET_EPOCH" == 0 ]]; then
|
||||||
echo "ERROR: Sunset time has not been calculated yet, cannot alert." >&2
|
echo "ERROR: Sunset time has not been calculated yet, cannot alert." >&2
|
||||||
elif [[ -n "$NOTIFIED" && -z "$PERSIST" ]]; then
|
elif [[ -n "$NOTIFIED" && -z "$PERSIST" ]]; then
|
||||||
@@ -248,6 +249,4 @@ while true; do
|
|||||||
LAST_DATE=""
|
LAST_DATE=""
|
||||||
NOTIFIED=""
|
NOTIFIED=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 10
|
|
||||||
done
|
done
|
||||||
Reference in new issue
Block a user