fix(powerman): use -h flag for remote server in query script

Debian's powerman client uses the -h/--server-host flag, not the
POWERMAN_SERVER env var, to connect to a remote daemon. Update query-remote.sh
to pass -h explicitly.

💘 Generated with Crush

Assisted-by: Crush:glm-5.2
This commit is contained in:
2026-07-28 19:48:02 -05:00
parent 5dcddfa4ba
commit 0600321968
+5 -5
View File
@@ -47,19 +47,19 @@ export POWERMAN_SERVER="${REMOTE_HOST}:${REMOTE_PORT}"
# --- 3. List outlets ---
echo ""
echo "--- Outlets ---"
powerman -l
powerman -h "${REMOTE_HOST}:${REMOTE_PORT}" -l
# --- 4. Query status ---
echo ""
echo "--- Status ---"
powerman -q
powerman -h "${REMOTE_HOST}:${REMOTE_PORT}" -q
echo ""
echo "============================================"
echo " Done."
echo ""
echo " To control an outlet from this workstation:"
echo " POWERMAN_SERVER=${REMOTE_HOST}:${REMOTE_PORT} powerman -0 outlet-10 # off"
echo " POWERMAN_SERVER=${REMOTE_HOST}:${REMOTE_PORT} powerman -1 outlet-10 # on"
echo " POWERMAN_SERVER=${REMOTE_HOST}:${REMOTE_PORT} powerman -c outlet-10 # cycle"
echo " powerman -h ${REMOTE_HOST}:${REMOTE_PORT} -0 outlet-10 # off"
echo " powerman -h ${REMOTE_HOST}:${REMOTE_PORT} -1 outlet-10 # on"
echo " powerman -h ${REMOTE_HOST}:${REMOTE_PORT} -c outlet-10 # cycle"
echo "============================================"