Browse Source

Generate Tor hidden services on configuration (#503)

v0.3.3
Mayank Chhabra 4 years ago
committed by GitHub
parent
commit
8d85cd9de9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      scripts/configure

22
scripts/configure

@ -343,6 +343,28 @@ mv -f "$TOR_CONF_FILE" "./tor/torrc"
mv -f "$ELECTRS_CONF_FILE" "./electrs/electrs.toml"
mv -f "$ENV_FILE" "./.env"
##########################################################
######### Generate hidden services on first run ##########
##########################################################
# Prevents CORS issue if dashboard's hidden service
# doesn't exist on the first run
if [[ ! -f "${STATUS_DIR}/configured" ]]; then
echo "Generating hidden services..."
echo
docker-compose up --detach tor
wait_for_tor=10
while [[ ! -f "${UMBREL_ROOT}/tor/data/web/hostname" ]]; do
if [[ "${wait_for_tor}" == 0 ]]; then
echo "Dashboard's hidden service file wasn't created..."
echo
break
fi
sleep 1
((wait_for_tor--))
done
docker-compose down
fi
##########################################################
################ Configuration complete ##################

Loading…
Cancel
Save