Update Qubes/Whonix install for individual files (#1739)

This commit is contained in:
PromptPunksFauxCough 2025-05-12 21:27:39 +00:00 committed by GitHub
parent fe3283f3b0
commit 050e6b907a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 32 deletions

View file

@ -3,8 +3,8 @@
function remote {
if [[ -z $PRECOMPILED_URL || -z $FINGERPRINT ]]; then
printf "\nNo arguments provided!\n\nThis script requires two arguments to be provided:\nBinary URL & PGP Fingerprint\n\nPlease review documentation and try again.\n\nExiting now ...\n"
if [[ -z $PACKAGE_URL || -z $FINGERPRINT ]]; then
printf "\nNo arguments provided!\n\nThis script requires two arguments to be provided:\nPackage URL & PGP Fingerprint\n\nPlease review documentation and try again.\n\nExiting now ...\n"
exit 1
fi
## Update & Upgrade
@ -32,12 +32,11 @@ function remote {
## Define URL & PGP Fingerprint etc. vars:
user_url=$PRECOMPILED_URL
user_url=$PACKAGE_URL
base_url=$(printf ${user_url} | awk -F'/' -v OFS='/' '{$NF=""}1')
expected_fingerprint=$FINGERPRINT
binary_filename=$(awk -F'/' '{ print $NF }' <<< "$user_url")
package_filename="haveno.deb"
signature_filename="${binary_filename}.sig"
package_filename=$(awk -F'/' '{ print $NF }' <<< "$user_url")
signature_filename="${package_filename}.sig"
key_filename="$(printf "$expected_fingerprint" | tr -d ' ' | sed -E 's/.*(................)/\1/' )".asc
wget_flags="--tries=10 --timeout=10 --waitretry=5 --retry-connrefused --show-progress"
@ -46,7 +45,6 @@ function remote {
printf "\nUser URL=$user_url\n"
printf "\nBase URL=$base_url\n"
printf "\nFingerprint=$expected_fingerprint\n"
printf "\nBinary Name=$binary_filename\n"
printf "\nPackage Name=$package_filename\n"
printf "\nSig Filename=$signature_filename\n"
printf "\nKey Filename=$key_filename\n"
@ -94,7 +92,7 @@ function remote {
## Verify the downloaded binary with the signature:
echo_blue "Verifying the signature of the downloaded file ..."
if gpg --digest-algo SHA256 --verify "${signature_filename}" >/dev/null 2>&1; then
7z x "${binary_filename}" && mv haveno*.deb "${package_filename}";
mkdir -p /usr/share/desktop-directories;
else echo_red "Verification failed!" && sleep 5
exit 1;
fi
@ -172,7 +170,7 @@ if ! [[ $# -eq 2 || $# -eq 3 ]] ; then
fi
if [[ $# -eq 2 ]] ; then
PRECOMPILED_URL=$1
PACKAGE_URL=$1
FINGERPRINT=$2
remote
fi

View file

@ -1,5 +1,5 @@
#!/bin/zsh
## ./haveno-on-qubes/scripts/3.0-haveno-appvm_taker.sh
## ./haveno-on-qubes/scripts/3.0-haveno-appvm_taker.sh
## Function to print messages in blue:
echo_blue() {
@ -42,7 +42,7 @@ whonix_firewall
### Create Desktop Launcher:
echo_blue "Creating desktop launcher ..."
mkdir -p /home/$(ls /home)/\.local/share/applications
sed 's|/opt/haveno/bin/Haveno|/opt/haveno/bin/Haveno --torControlPort=9051 --torControlUseSafeCookieAuth --torControlCookieFile=/var/run/tor/control.authcookie --socks5ProxyXmrAddress=127.0.0.1:9050 --useTorForXmr=on|g' /opt/haveno/lib/haveno-Haveno.desktop > /home/$(ls /home)/.local/share/applications/haveno-Haveno.desktop
sed 's|/opt/haveno/bin/Haveno|/opt/haveno/bin/Haveno --torControlPort=9051 --socks5ProxyXmrAddress=127.0.0.1:9050 --useTorForXmr=on|g' /opt/haveno/lib/haveno-Haveno.desktop > /home/$(ls /home)/.local/share/applications/haveno-Haveno.desktop
chown -R $(ls /home):$(ls /home) /home/$(ls /home)/.local/share/applications/haveno-Haveno.desktop