#!/data/data/com.termux/files/usr/bin/bash # OpenClaw Auth Widget for Termux # Place in ~/.shortcuts/ for Termux:Widget # # This widget checks auth status and helps with re-auth if needed. # It's designed for quick one-tap checking from phone home screen.
# Server hostname (via Tailscale or SSH config)
SERVER="${OPENCLAW_SERVER:-l36}"
# Check auth status
termux-toast "Checking OpenClaw auth..."
# Ask if user wants to re-auth now
CHOICE=$(termux-dialog radio -t "Auth Expiring Soon" -v "Re-auth now,Check later,Dismiss")
SELECTED=$(echo"$CHOICE" | jq -r '.text // "Dismiss"')
# Show instructions
termux-dialog confirm -t "Re-auth Instructions" -i "1. Create/copy API key from browser
2. Return here and tap OK
3. SSH to server and paste key"
# Open terminal to server
am start -n com.termux/com.termux.app.TermuxActivity -a android.intent.action.MAIN
termux-toast "Run: ssh $SERVER '$HOME/openclaw/scripts/mobile-reauth.sh'"
;;
*)
termux-toast "Reminder: Auth expires soon"
;;
esac
;;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.