- FastAPI + uvicorn server (turnup-ui) serving config API and static files - React + TypeScript frontend: connection, global LEDs, per-knob/button cards, preset save/load/apply, toast notifications, dark theme - Vite builds into src/turnup/ui/static/ so no Node.js needed at install time - PWA assets (manifest, service worker, icon) in ui/public/ - turnup-ui.service systemd user unit; enabled globally via turnupd.install - PKGBUILD: add python-fastapi + python-uvicorn deps, install UI service file - pyproject.toml: ui extras group, turnup-ui entry point
33 lines
1.5 KiB
Plaintext
33 lines
1.5 KiB
Plaintext
post_install() {
|
|
systemctl --global enable turnupd.service
|
|
systemctl --global enable turnup-ui.service
|
|
echo "turnupd + turnup-ui: services enabled for all users — they will start on next login."
|
|
echo "To start them now:"
|
|
echo " systemctl --user start turnupd.service"
|
|
echo " systemctl --user start turnup-ui.service"
|
|
echo "UI will be available at http://127.0.0.1:5173"
|
|
}
|
|
|
|
post_upgrade() {
|
|
systemctl --global reenable turnupd.service
|
|
systemctl --global reenable turnup-ui.service
|
|
# Restart for all currently logged-in users
|
|
while read -r uid _; do
|
|
systemctl -M "${uid}@.host" --user restart turnupd.service 2>/dev/null || true
|
|
systemctl -M "${uid}@.host" --user restart turnup-ui.service 2>/dev/null || true
|
|
done < <(loginctl list-users --no-legend 2>/dev/null)
|
|
}
|
|
|
|
pre_remove() {
|
|
# Stop and disable for all currently logged-in users
|
|
while read -r uid _; do
|
|
systemctl -M "${uid}@.host" --user stop turnupd.service 2>/dev/null || true
|
|
systemctl -M "${uid}@.host" --user disable turnupd.service 2>/dev/null || true
|
|
systemctl -M "${uid}@.host" --user stop turnup-ui.service 2>/dev/null || true
|
|
systemctl -M "${uid}@.host" --user disable turnup-ui.service 2>/dev/null || true
|
|
done < <(loginctl list-users --no-legend 2>/dev/null)
|
|
|
|
systemctl --global disable turnupd.service 2>/dev/null || true
|
|
systemctl --global disable turnup-ui.service 2>/dev/null || true
|
|
}
|