34 lines
869 B
Bash
34 lines
869 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
echo "🚀 Starting kiosk deployment..."
|
|
|
|
REPO_DIR="/home/pi/kiosk"
|
|
SYSTEMD_DIR="/etc/systemd/system"
|
|
|
|
# Make sure we are in the repo directory
|
|
cd "$REPO_DIR" || { echo "❌ Repo directory not found at $REPO_DIR"; exit 1; }
|
|
|
|
# Make scripts executable
|
|
chmod +x start-kiosk.sh
|
|
chmod +x update-kiosk.sh
|
|
|
|
# Copy and install kiosk service
|
|
sudo cp kiosk.service "$SYSTEMD_DIR/"
|
|
sudo systemctl enable --now kiosk.service
|
|
|
|
# Copy and install update service and timer
|
|
sudo cp update-kiosk.service "$SYSTEMD_DIR/"
|
|
sudo cp update-kiosk.timer "$SYSTEMD_DIR/"
|
|
sudo systemctl daemon-reexec
|
|
sudo systemctl enable --now update-kiosk.timer
|
|
|
|
echo "✅ Kiosk service and update timer are set up and running!"
|
|
|
|
# Optional: show status
|
|
sudo systemctl status kiosk.service --no-pager
|
|
sudo systemctl status update-kiosk.timer --no-pager
|
|
|
|
echo "🎉 Deployment complete!"
|