fixing services

This commit is contained in:
Karl 2025-07-18 10:10:48 +01:00
parent ab39f114a8
commit deebd533ce
5 changed files with 5 additions and 15 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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() {

View File

@ -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() {