diff --git a/kiosk-display-setup.sh b/kiosk-display-setup.sh index 8bfcd0d..304c0f6 100644 --- a/kiosk-display-setup.sh +++ b/kiosk-display-setup.sh @@ -20,7 +20,7 @@ LOCATION="$( HOSTNAME="DISPLAY-NVR-$LOCATION" [[ ${#HOSTNAME} -le 63 ]] || die "Hostname too long: $HOSTNAME" -read -r -p "Enter the NVR server URL (default: http://192.168.25.248): " URL_INPUT +read -r -p "Enter the server URL (default: http://192.168.25.248): " URL_INPUT URL="${URL_INPUT:-http://192.168.25.248}" [[ "$URL" =~ ^https?:// ]] || die "URL must start with http:// or https://" @@ -31,9 +31,9 @@ REBOOT_TIME="${REBOOT_TIME:-06:00}" APP_DIR="$HOME/.local/bin" AUTOSTART_DIR="$HOME/.config/autostart" XORG_CONF_DIR="/etc/X11/xorg.conf.d" -LAUNCHER="$APP_DIR/launch-nvr.sh" -DESKTOP_FILE="$AUTOSTART_DIR/launch-nvr.desktop" -CONFIG_FILE="$HOME/.config/nvr-display.conf" +LAUNCHER="$APP_DIR/launch-kiosk.sh" +DESKTOP_FILE="$AUTOSTART_DIR/launch-kiosk.desktop" +CONFIG_FILE="$HOME/.config/kiosk-display.conf" mkdir -p "$APP_DIR" "$AUTOSTART_DIR" "$HOME/.config" @@ -72,14 +72,14 @@ chmod 700 "$LAUNCHER" cat > "$DESKTOP_FILE" </dev/null <<'EOF' +sudo tee /etc/systemd/system/kiosk-daily-reboot.service >/dev/null <<'EOF' [Unit] -Description=Reboot NVR display computer +Description=Reboot kiosk display computer [Service] Type=oneshot ExecStart=/usr/bin/systemctl reboot EOF -sudo tee /etc/systemd/system/nvr-daily-reboot.timer >/dev/null </dev/null <