wolf: fix manage.sh apps permission denied on /etc/wolf/cfg/config.toml

config.toml is root-owned (Wolf container writes it as root). manage.sh
runs as the regular user, so python3 and grep against the file need sudo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D8ckUJQtj1pH8jtAddBDZs
This commit is contained in:
Claude
2026-06-20 04:56:04 +00:00
parent 54082ad8b0
commit 87414bdc44
+2 -2
View File
@@ -938,7 +938,7 @@ case "$1" in
# Show which apps are already installed and what's available
echo ""
echo " Checking current Wolf config..."
INSTALLED=$(grep "^ name = 'Wolf" "$WOLF_CFG" 2>/dev/null | sed "s/.*name = '//;s/'//" | tr '\n' ' ')
INSTALLED=$(sudo grep "^ name = 'Wolf" "$WOLF_CFG" 2>/dev/null | sed "s/.*name = '//;s/'//" | tr '\n' ' ')
[ -n "$INSTALLED" ] && echo " Already installed: $INSTALLED" || echo " No Wolf apps installed yet."
echo ""
echo " Available apps:"
@@ -988,7 +988,7 @@ case "$1" in
echo " Applying: ${APP_KEYS:-none}"
[ -z "$APP_KEYS" ] && exit 0
python3 - "$GAME_DIR" "$WOLF_CFG" $APP_KEYS << 'PYEOF'
sudo python3 - "$GAME_DIR" "$WOLF_CFG" $APP_KEYS << 'PYEOF'
import sys, json
games = sys.argv[1].rstrip('/')