-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkiosk-serv
More file actions
executable file
·37 lines (31 loc) · 886 Bytes
/
kiosk-serv
File metadata and controls
executable file
·37 lines (31 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# Run script from openbox autostart
# If thermals drop below 55*C restart kiosk
# verbosity
#set -x
# dynamic variables
number (){
LOW="0"
HIGH="54"
NUMBER=$(cat /sys/class/thermal/thermal_zone0/temp|cut -c1-2)
}
# url and html file
URL="http://feed.com/"
HTML="cams.html"
# allow 1 minute before running loop
sleep 60
# run loop
while true; do
service avahi-daemon restart # make sure avahi is available
number
if ((NUMBER >= $LOW && NUMBER <= $HIGH)); then
killall chromium > /dev/null 2>&1; killall chromium > /dev/null 2>&1
rm -fdr ${HOME}/.cache/chromium
rm -fdr ${HOME}/.config/chromium
DISPLAY=:0 chromium --password-store=basic --noerrdialogs --incognito --kiosk --force-device-scale-factor=1 --disk-cache-dir=/tmp/null --enable-features=WebUIDarkMode --force-dark-mode ${URL}${HTML} > /dev/null 2>&1 &
sleep 300
else
sleep 300
fi
done
exit 0