mirror of
https://github.com/karl0ss/AnotterKiosk.git
synced 2025-07-28 03:00:16 +01:00
fixing services
This commit is contained in:
parent
ab39f114a8
commit
deebd533ce
@ -15,7 +15,7 @@ reboot_time = 04:00
|
||||
; set screen rotation to be used (normal, left, right, inverted)
|
||||
;rotate_screen = "normal"
|
||||
; configure screen to power on/off as specific time of day (time format in 24 hours)
|
||||
;screen_off_time=23:00
|
||||
screen_off_time=22:30
|
||||
;screen_on_time=07:00
|
||||
; configure chrome to refresh the page every x minutes
|
||||
;refresh_screen_every_x_min=15
|
||||
|
@ -1,4 +1,4 @@
|
||||
# /etc/systemd/system/kiosk-sechedule-screen.service
|
||||
# /etc/systemd/system/kiosk-schedule-screen.service
|
||||
[Unit]
|
||||
Description=Schedule Screen On/Off Timers
|
||||
After=multi-user.target
|
@ -6,8 +6,7 @@ then
|
||||
if [ -f "/boot/id_rsa" ]; then
|
||||
cp /boot/id_rsa /root/.ssh/id_rsa
|
||||
AUTOSSH_KEYPATH="-i /root/.ssh/id_rsa"
|
||||
fi
|
||||
if [ -f "/boot/id_ed25519" ]; then
|
||||
elif [ -f "/boot/id_ed25519" ]; then
|
||||
cp /boot/id_ed25519 /root/.ssh/id_ed25519
|
||||
AUTOSSH_KEYPATH="-i /root/.ssh/id_ed25519"
|
||||
fi
|
||||
|
@ -16,14 +16,7 @@ remount_root() {
|
||||
|
||||
|
||||
get_ini_value() {
|
||||
local section=$1 key=$2
|
||||
awk -F '=' -v sec="$section" -v k="$key" '
|
||||
$0 ~ /^\[.*\]/ { in_section = ($0 == "[" sec "]") }
|
||||
in_section && $1 ~ "^"k"$" {
|
||||
gsub(/^[ \t]+|[ \t]+$/, "", $2)
|
||||
print $2
|
||||
exit
|
||||
}' "$INI_FILE"
|
||||
get-ini "$INI_FILE" "$1" "$2"
|
||||
}
|
||||
|
||||
create_recurring_timer() {
|
||||
|
@ -1,9 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
INI_FILE="/boot/kioskbrowser.ini"
|
||||
REFRESH_INTERVAL=$(awk -F '=' '/^\[screen\]/ { in_screen=1; next }
|
||||
in_screen && /^\[/ { in_screen=0 }
|
||||
in_screen && $1 ~ /refresh_screen_every_x_min/ { gsub(/ /, "", $2); print $2 }' "$INI_FILE")
|
||||
REFRESH_INTERVAL=$(get-ini "$INI_FILE" screen refresh_screen_every_x_min)
|
||||
|
||||
# Function to safely remount root FS
|
||||
remount_root() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user