Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
55 lines
1.6 KiB
Bash
Executable File
55 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# Script to update PROXMOX_TOKEN_VALUE in .env file
|
|
|
|
ENV_FILE="$HOME/.env"
|
|
|
|
if [ ! -f "$ENV_FILE" ]; then
|
|
echo "❌ .env file not found at $ENV_FILE"
|
|
exit 1
|
|
fi
|
|
|
|
echo "🔐 Update Proxmox API Token"
|
|
echo "============================"
|
|
echo ""
|
|
echo "Please paste the token secret you copied from Proxmox UI:"
|
|
echo "(The secret will be hidden as you type)"
|
|
echo ""
|
|
read -s TOKEN_VALUE
|
|
|
|
if [ -z "$TOKEN_VALUE" ]; then
|
|
echo "❌ No token value provided"
|
|
exit 1
|
|
fi
|
|
|
|
# Update the .env file
|
|
if grep -q "^PROXMOX_TOKEN_VALUE=" "$ENV_FILE"; then
|
|
# Use sed to update the line (works with special characters)
|
|
sed -i "s|^PROXMOX_TOKEN_VALUE=.*|PROXMOX_TOKEN_VALUE=$TOKEN_VALUE|" "$ENV_FILE"
|
|
echo ""
|
|
echo "✅ Token updated in $ENV_FILE"
|
|
else
|
|
echo "❌ PROXMOX_TOKEN_VALUE not found in .env file"
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
echo "Verifying configuration..."
|
|
if grep -q "^PROXMOX_TOKEN_VALUE=$TOKEN_VALUE" "$ENV_FILE"; then
|
|
echo "✅ Token successfully configured!"
|
|
echo ""
|
|
echo "Current configuration:"
|
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
grep "^PROXMOX_" "$ENV_FILE" | grep -v "TOKEN_VALUE" | sed 's/=.*/=***/'
|
|
echo "PROXMOX_TOKEN_VALUE=***configured***"
|
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
echo ""
|
|
echo "You can now test the connection:"
|
|
echo " ./verify-setup.sh"
|
|
echo " pnpm test:basic"
|
|
else
|
|
echo "⚠️ Token may not have been updated correctly"
|
|
fi
|
|
|