Skip to content
Snippets Groups Projects
Commit b00a8c60 authored by Recolic's avatar Recolic :house_with_garden:
Browse files

u

parent 19abdd88
No related branches found
No related tags found
No related merge requests found
......@@ -159,6 +159,10 @@ elif [[ "$op" = "night" ]]; then
if [[ $curr_time -gt $alarm_ts ]]; then
alarm_ts=$(date +%s -d "tomorrow $MORNING_ALARM")
fi
if [ $(( ($alarm_ts-$curr_time)/60 - 16*60 )) -gt 0 ]; then
echo "!! Refused to arm timer in more than 16 hours."
exit 1
fi
echo "++ Arm leave timer to morning and switch to 'work' mode, in $(( ($alarm_ts-$curr_time)/60 )) min"
echo "arm_timer $alarm_ts" >> $TMP_CTL_FILE
echo "set_mode work" >> $TMP_CTL_FILE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment