feat: APK distribution pipeline — server hosting + Pi auto-update + /app routes
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# One-time install of the Android APK auto-updater on the Pi.
|
||||
# Run ON THE PI as the `yaris` user (needs sudo):
|
||||
# cd ~/app/yaris-obd && bash deploy/install_app_updater.sh
|
||||
#
|
||||
# Installs a systemd timer that polls the remote server for the latest APK
|
||||
# and mirrors it to static/app/ so the phone can install from
|
||||
# http://10.42.0.1/app without leaving the car hotspot.
|
||||
set -euo pipefail
|
||||
|
||||
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
|
||||
sudo systemctl stop yaris-app-updater.timer yaris-app-updater.service 2>/dev/null || true
|
||||
sudo install -m 755 "$REPO_DIR/deploy/yaris_app_updater.py" /usr/local/bin/yaris-app-updater
|
||||
sudo install -m 644 "$REPO_DIR/deploy/yaris-app-updater.service" /etc/systemd/system/yaris-app-updater.service
|
||||
sudo install -m 644 "$REPO_DIR/deploy/yaris-app-updater.timer" /etc/systemd/system/yaris-app-updater.timer
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now yaris-app-updater.timer
|
||||
sudo systemctl start yaris-app-updater.service
|
||||
echo "APK updater installed. Check: systemctl status yaris-app-updater.service"
|
||||
Reference in New Issue
Block a user