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."
|
||||
show_alert
|
||||
NOTIFIED="true"
|
||||
|
||||
echo "Alert has been dismissed, sleeping for 5 minutes."
|
||||
sleep 290
|
||||
echo "Waking back up from notification dismissal."
|
||||
echo "Alert has been dismissed."
|
||||
if [[ -n "$PERSIST" ]]; then
|
||||
echo "Sleeping for 5 minutes before next notification."
|
||||
sleep 300
|
||||
fi
|
||||
elif [[ "$SUNSET_EPOCH" == 0 ]]; then
|
||||
echo "ERROR: Sunset time has not been calculated yet, cannot alert." >&2
|
||||
elif [[ -n "$NOTIFIED" && -z "$PERSIST" ]]; then
|
||||
@@ -248,6 +249,4 @@ while true; do
|
||||
LAST_DATE=""
|
||||
NOTIFIED=""
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
done
|
||||
Reference in new issue
Block a user