aboutsummaryrefslogtreecommitdiffstats
path: root/.local/bin/sct-daemon
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/sct-daemon')
-rwxr-xr-x.local/bin/sct-daemon18
1 files changed, 18 insertions, 0 deletions
diff --git a/.local/bin/sct-daemon b/.local/bin/sct-daemon
new file mode 100755
index 0000000..b16a67e
--- /dev/null
+++ b/.local/bin/sct-daemon
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+
+while true; do
+ hour=$(date +%H)
+
+ if [ "$hour" -ge 6 ] && [ "$hour" -lt 18 ]; then
+ sct 6500 # day
+ elif [ "$hour" -ge 18 ] && [ "$hour" -lt 20 ]; then
+ sct 4500 # evening
+ elif [ "$hour" -ge 20 ] && [ "$hour" -lt 22 ]; then
+ sct 3500 # night
+ else
+ sct 3000 # late night/early morning
+ fi
+
+ sleep 600 # check every 10 minutes
+done