Files
Alpine_5G/scripts/ssh-diag-modem.sh
nearxos 160ad641ce Add web GUI, docs, scripts, and 5G router config
- Web app (Flask): status, config, firewall, logs, users, restart
- Docs: AT commands, deploy, DNS, quickstart, web GUI
- Scripts: connect, deploy, diag, healthcheck, modem-status, speedtest, status, troubleshoot
- Init and iptables: 5g-router, 5g-webgui, rules.v4
- CHANGELOG, TODO, REVISION; config and README updates
2026-02-02 09:38:23 +02:00

27 lines
763 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# Alpine 5G Router run modem diagnostics on device via SSH
# Usage: ./scripts/ssh-diag-modem.sh [user@host]
# Or: TARGET=root@192.168.1.1 ./scripts/ssh-diag-modem.sh
TARGET="${1:-${TARGET:-root@10.130.60.121}}"
SSH_OPTS="${SSH_OPTS:--o ConnectTimeout=10}"
echo "Running modem diagnostics on $TARGET"
echo ""
ssh $SSH_OPTS "$TARGET" "
echo '========== diag-modem-up.sh =========='
if [ -x /usr/local/bin/diag-modem-up.sh ]; then
/usr/local/bin/diag-modem-up.sh
else
echo 'Not installed. Deploy first: ./scripts/deploy.sh $TARGET'
echo 'Then re-run this script.'
exit 1
fi
echo ''
echo '========== diag-at-port.sh =========='
if [ -x /usr/local/bin/diag-at-port.sh ]; then
/usr/local/bin/diag-at-port.sh
fi
"