Serve the Pi's web UI on port 80 instead of 8080
Just http://<pi-ip> now instead of http://<pi-ip>:8080. Safe since the systemd service already runs as root (needed for GPIO/SPI access anyway), so binding the privileged port isn't a new requirement. Local --mock dev stays on 8080 (README/main.py default unchanged) -- that's normally run without root, and port 80 needs it. install.sh now does enable + restart instead of enable --now, so re-running it after a unit-file change (like this one) actually applies on an already-installed instance, not just a fresh install.
This commit is contained in:
1 parent
79641914fd
commit
322e2882ca
3 files changed
+8
-4
No files matched your search
@@ -45,7 +45,7 @@ InkyPi (or anything else) already running, it stops it first -- two things
|
||||
can't drive the same panel at once -- but nothing is copied from or reused
|
||||
out of it. Safe to re-run.
|
||||
|
||||
Then open `http://<pi-ip>:8080`, fill in Navidrome credentials under
|
||||
Then open `http://<pi-ip>`, fill in Navidrome credentials under
|
||||
**Navidrome** and a city under **Weather**. Everything saves immediately and
|
||||
takes effect within a few seconds -- no restart needed.
|
||||
|
||||
|
||||
+6
-2
@@ -94,7 +94,11 @@ install_service() {
|
||||
-e "s#{{PYTHON}}#$VENV_DIR/bin/python3#g" \
|
||||
"$APP_DIR/paperwall.service.template" > "$SERVICE_TARGET"
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now "$SERVICE_NAME"
|
||||
systemctl enable "$SERVICE_NAME"
|
||||
# restart (not just enable --now) so re-running this after a unit file
|
||||
# change -- e.g. the port -- actually picks it up on an already-running
|
||||
# install, not just on a fresh one.
|
||||
systemctl restart "$SERVICE_NAME"
|
||||
echo " installed and started."
|
||||
}
|
||||
|
||||
@@ -104,7 +108,7 @@ show_status() {
|
||||
systemctl status "$SERVICE_NAME" --no-pager -l | head -15 || true
|
||||
ip_address=$(hostname -I | awk '{print $1}')
|
||||
echo
|
||||
echo "Web UI: http://$ip_address:8080 (or http://$(hostname).local:8080)"
|
||||
echo "Web UI: http://$ip_address (or http://$(hostname).local)"
|
||||
echo "Logs: journalctl -u $SERVICE_NAME -f"
|
||||
echo "Remove: sudo bash uninstall.sh"
|
||||
if grep -qE '^\s*dtoverlay=spi0-2cs' "$CONFIG_TXT" 2>/dev/null; then
|
||||
|
||||
@@ -6,7 +6,7 @@ Wants=network-online.target
|
||||
[Service]
|
||||
Type=simple
|
||||
# Filled in by install.sh to point at this project's own self-contained venv.
|
||||
ExecStart={{PYTHON}} {{APP_DIR}}/main.py --host 0.0.0.0 --port 8080
|
||||
ExecStart={{PYTHON}} {{APP_DIR}}/main.py --host 0.0.0.0 --port 80
|
||||
WorkingDirectory={{APP_DIR}}
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
Reference in new issue
Block a user