mirror of
https://github.com/getumbrel/umbrel-apps.git
synced 2024-11-11 16:09:18 +00:00
c873c99e55
Co-authored-by: Steven Briscoe <me@stevenbriscoe.com>
27 lines
775 B
Bash
Executable File
27 lines
775 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Delay booting Samourai Server until the Dojo and Whirlpool Tor Hidden Services are ready
|
|
|
|
HIDDEN_SERVICE_FILE="${TOR_DATA_DIR}/app-${APP_ID}-dojo/hostname"
|
|
|
|
if [[ -f "${HIDDEN_SERVICE_FILE}" ]]; then
|
|
exit
|
|
fi
|
|
|
|
"${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" up --detach nginx
|
|
"${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" up --detach whirlpool
|
|
"${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" up --detach tor
|
|
|
|
echo "App: ${APP_ID} - Generating Tor Hidden Service..."
|
|
|
|
for attempt in $(seq 1 100); do
|
|
if [[ -f "${HIDDEN_SERVICE_FILE}" ]]; then
|
|
echo "App: ${APP_ID} - Hidden service file created successfully!"
|
|
break
|
|
fi
|
|
sleep 0.1
|
|
done
|
|
|
|
if [[ ! -f "${HIDDEN_SERVICE_FILE}" ]]; then
|
|
echo "App: ${APP_ID} - Hidden service file wasn't created"
|
|
fi |