generated from CubeCraft-Creations/Tracehound
setup-pi: default service user to invoking sudo user, not "pi"
The service unit hard-defaulted to User=pi, but not every Pi has a 'pi'
user (e.g. this hub uses 'overseer') — systemd then fails with 217/USER.
Default SERVICE_USER to ${SUDO_USER:-pi} so the service + /opt/remoterig
ownership match the actual operator. Override with --service-user.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# Options:
|
||||
# --config PATH Path to config.yaml template to copy to /opt/remoterig/
|
||||
# --service-user USER Systemd service user (default: pi)
|
||||
# --service-user USER Systemd service user (default: invoking sudo user, else pi)
|
||||
# --static-ip IP Static IP for wlan0 (default: 192.168.8.56/24)
|
||||
# --gateway IP Gateway for wlan0 (default: 192.168.8.1)
|
||||
# --help Show this help
|
||||
@@ -19,7 +19,7 @@ set -euo pipefail
|
||||
# Defaults
|
||||
# ---------------------------------------------------------------------------
|
||||
CONFIG_TEMPLATE=""
|
||||
SERVICE_USER="pi"
|
||||
SERVICE_USER="${SUDO_USER:-pi}" # default to the invoking user (not every Pi has a 'pi' user)
|
||||
STATIC_IP="192.168.8.56/24"
|
||||
GATEWAY="192.168.8.1"
|
||||
MOSQUITTO_PKG="mosquitto mosquitto-clients"
|
||||
|
||||
Reference in New Issue
Block a user