Files
senior-kiosk/preseed-bootstrap.sh
T

41 lines
1.2 KiB
Bash

#!/bin/bash
set -e
# Downloaded and run by the preseed late_command after Debian base install.
# Fetches install-kiosk.sh and installs it as a first-boot setup service.
# The service runs interactively on the first reboot, prompts for name/username,
# then installs the kiosk and reboots into kiosk mode.
REPO_BASE="https://gitea.jgitta.com/jgitta/senior-kiosk/raw/branch/master"
echo "==> SeniorNet: downloading setup script..."
curl -fsSL "$REPO_BASE/install-kiosk.sh" -o /usr/local/bin/kiosk-setup
chmod +x /usr/local/bin/kiosk-setup
echo "==> SeniorNet: installing first-boot service..."
cat > /etc/systemd/system/kiosk-firstboot.service << 'EOF'
[Unit]
Description=SeniorNet Kiosk First-Boot Setup
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/kiosk-setup
StandardInput=tty
TTYPath=/dev/tty1
TTYReset=yes
IgnoreSIGPIPE=no
SendSIGHUP=yes
RemainAfterExit=no
[Install]
WantedBy=multi-user.target
EOF
systemctl enable kiosk-firstboot
# Boot to text mode for the first-boot wizard, then kiosk setup switches to graphical
systemctl set-default multi-user.target
echo "==> SeniorNet: ready. First-boot setup will run on next reboot."