#!/usr/bin/env bash # .5 에 사이트 서버 .env 를 만든다 (secrets.json 에서 읽어 바로 원격에 씀, 로컬에 남기지 않음) set -euo pipefail HOST=root@192.168.10.5 DIR=/root/other/game-voice-recorder python3 - <<'PY' | ssh -o BatchMode=yes $HOST "mkdir -p $DIR && umask 077 && cat > $DIR/.env" import json, secrets c = json.load(open('/home/claude/.config/ejclaw/secrets.json'))['credentials']['discord.com/bot/game-voice-recorder'] print(f"PUBLIC_URL=https://gvr.tkrmagid.kr") print(f"DISCORD_CLIENT_ID={c['client_id']}") print(f"DISCORD_CLIENT_SECRET={c['client_secret']}") print(f"DISCORD_BOT_TOKEN={c['token']}") print(f"SESSION_SECRET={secrets.token_urlsafe(48)}") print("ALLOWED_GUILD_IDS=457514742940958731") print("OWNER_DISCORD_IDS=293719842274541579") a = json.load(open('/home/claude/.config/ejclaw/secrets.json'))['credentials'].get('anthropic.api/game-voice-recorder') if a: print(f"ANTHROPIC_API_KEY={a['token']}") PY echo ".env 작성 완료"