-
Notifications
You must be signed in to change notification settings - Fork 575
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate 0.5.2 Tor dependent apps on update
Co-authored-by: Steven Briscoe <me@stevenbriscoe.com> Co-authored-by: Luke Childs <lukechilds123@gmail.com>
- Loading branch information
1 parent
37f08cf
commit fa8b256
Showing
3 changed files
with
40 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
RELEASE=$1 | ||
UMBREL_ROOT=$2 | ||
|
||
USER_FILE="${UMBREL_ROOT}/db/user.json" | ||
|
||
HAS_REMOTE_TOR_ACCESS=$(cat "${USER_FILE}" | jq 'has("remoteTorAccess")') | ||
|
||
if [[ "${HAS_REMOTE_TOR_ACCESS}" == "true" ]]; then | ||
echo "'remoteTorAccess' user setting already setup..." | ||
|
||
exit | ||
fi | ||
|
||
echo "Adding 'remoteTorAccess' user setting..." | ||
|
||
# Default to true for existing Umbrel users | ||
# The default for new installs will be false | ||
jq ".remoteTorAccess = true" "${USER_FILE}" > /tmp/user.json | ||
mv /tmp/user.json "${USER_FILE}" | ||
|
||
# Due to changes with how we handle app's Tor HSes | ||
# We need update the affected apps | ||
|
||
# Ensure we've pulled in all the latest app updates | ||
"${UMBREL_ROOT}/scripts/repo" update || true | ||
|
||
affected_apps="bitcoin core-lightning electrs elements gitea jam kollider lightning samourai-server sphinx-relay squeaknode suredbits-wallet synapse" | ||
|
||
for app in $affected_apps | ||
do | ||
if "${UMBREL_ROOT}/scripts/app" ls-installed | grep --quiet "${app}" | ||
then | ||
"${UMBREL_ROOT}/scripts/app" update "${app}" --skip-stop --skip-start || true | ||
fi | ||
done |