fix: start Tor in first-boot, ensure hidden services on fresh installs
Tor was configured in torrc but never started by first-boot-containers.sh. Connect wallet and .onion services were broken on fresh installs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f8ffc7f0a8
commit
6cced5d042
@ -32,6 +32,19 @@ SCRIPT_DIR_FBC="$(cd "$(dirname "$0")" && pwd)"
|
|||||||
TARGET_IP=$(hostname -I 2>/dev/null | awk '{print $1}')
|
TARGET_IP=$(hostname -I 2>/dev/null | awk '{print $1}')
|
||||||
[ -z "$TARGET_IP" ] && TARGET_IP="127.0.0.1"
|
[ -z "$TARGET_IP" ] && TARGET_IP="127.0.0.1"
|
||||||
|
|
||||||
|
# Ensure Tor is running for hidden services (LND connect, Electrumx, etc.)
|
||||||
|
if ! systemctl is-active tor >/dev/null 2>&1; then
|
||||||
|
log "Starting Tor..."
|
||||||
|
systemctl enable tor 2>/dev/null || true
|
||||||
|
systemctl start tor 2>/dev/null || true
|
||||||
|
sleep 3
|
||||||
|
if systemctl is-active tor >/dev/null 2>&1; then
|
||||||
|
log " Tor started successfully"
|
||||||
|
else
|
||||||
|
log " WARNING: Tor failed to start, hidden services will be unavailable"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
log() { echo "$(date '+%Y-%m-%d %H:%M:%S') $*" | tee -a "$LOG"; }
|
log() { echo "$(date '+%Y-%m-%d %H:%M:%S') $*" | tee -a "$LOG"; }
|
||||||
|
|
||||||
# Wait for a container to be healthy (accepting connections)
|
# Wait for a container to be healthy (accepting connections)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user