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>
82 lines
2.8 KiB
Bash
Executable File
82 lines
2.8 KiB
Bash
Executable File
#!/bin/bash
|
|
# Start Services Manually - Bypass systemd for unprivileged containers
|
|
|
|
set -uo pipefail
|
|
|
|
NODE_IP="192.168.11.11"
|
|
|
|
log_info() { echo -e "\033[0;32m[INFO]\033[0m $1"; }
|
|
log_success() { echo -e "\033[0;32m[✓]\033[0m $1"; }
|
|
log_error() { echo -e "\033[0;31m[ERROR]\033[0m $1"; }
|
|
|
|
start_postgresql_manual() {
|
|
local vmid="$1"
|
|
log_info "Starting PostgreSQL manually on CT $vmid..."
|
|
|
|
ssh -o ConnectTimeout=15 -o StrictHostKeyChecking=no root@${NODE_IP} "
|
|
pct exec $vmid -- bash -c '
|
|
# Start PostgreSQL manually
|
|
su - postgres -c \"pg_ctl -D /var/lib/postgresql/15/main -l /tmp/postgresql.log start\" 2>&1
|
|
sleep 3
|
|
|
|
# Verify it's running
|
|
su - postgres -c \"psql -c \\\"SELECT version();\\\"\" 2>&1 | head -1 && echo \"PostgreSQL running\" || echo \"PostgreSQL failed\"
|
|
'
|
|
" && log_success "PostgreSQL started on CT $vmid" || log_error "Failed on CT $vmid"
|
|
}
|
|
|
|
start_redis_manual() {
|
|
local vmid="$1"
|
|
log_info "Starting Redis manually on CT $vmid..."
|
|
|
|
ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no root@${NODE_IP} "
|
|
pct exec $vmid -- bash -c '
|
|
# Start Redis manually
|
|
redis-server /etc/redis/redis.conf --daemonize yes 2>&1
|
|
sleep 2
|
|
|
|
# Verify it's running
|
|
redis-cli ping 2>&1 | head -1 && echo \"Redis running\" || echo \"Redis failed\"
|
|
'
|
|
" && log_success "Redis started on CT $vmid" || log_error "Failed on CT $vmid"
|
|
}
|
|
|
|
echo "═══════════════════════════════════════════════════════════"
|
|
echo "Start Services Manually"
|
|
echo "═══════════════════════════════════════════════════════════"
|
|
echo ""
|
|
|
|
# Start PostgreSQL
|
|
log_info "Starting PostgreSQL manually..."
|
|
for vmid in 10000 10001 10100 10101; do
|
|
start_postgresql_manual "$vmid"
|
|
sleep 2
|
|
done
|
|
|
|
# Start Redis
|
|
log_info "Starting Redis manually..."
|
|
for vmid in 10020 10120; do
|
|
start_redis_manual "$vmid"
|
|
sleep 2
|
|
done
|
|
|
|
# Verify services
|
|
echo ""
|
|
log_info "Service Status:"
|
|
echo "PostgreSQL:"
|
|
for vmid in 10000 10001 10100 10101; do
|
|
result=$(ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no root@${NODE_IP} \
|
|
"pct exec $vmid -- bash -c 'su - postgres -c \"psql -c \\\"SELECT 1;\\\"\" 2>&1 | head -1'")
|
|
echo " CT $vmid: $result"
|
|
done
|
|
|
|
echo "Redis:"
|
|
for vmid in 10020 10120; do
|
|
result=$(ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no root@${NODE_IP} \
|
|
"pct exec $vmid -- bash -c 'redis-cli ping 2>&1 | head -1'")
|
|
echo " CT $vmid: $result"
|
|
done
|
|
|
|
echo ""
|
|
log_success "Manual service startup complete!"
|