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
+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
|
||||
|
||||
Reference in new issue
Block a user