From 54c4d243820516ea93a2305a8e27ecc084fcfc20 Mon Sep 17 00:00:00 2001 From: kawaiipunk Date: Sun, 2 Jul 2023 00:21:00 +0100 Subject: [PATCH] Inital commit --- upgrade-mullvad-vpn.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 upgrade-mullvad-vpn.sh diff --git a/upgrade-mullvad-vpn.sh b/upgrade-mullvad-vpn.sh new file mode 100755 index 0000000..eab15d2 --- /dev/null +++ b/upgrade-mullvad-vpn.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Download the Mullvad VPN client and its PGP signature +wget https://mullvad.net/en/download/app/deb/latest -O mullvad-vpn-linux-latest.deb +wget https://mullvad.net/en/download/app/deb/latest/signature -O mullvad-vpn-linux-latest.deb.sig + +# Import Mullvad PGP key +wget https://mullvad.net/media/mullvad-code-signing.asc +gpg --import mullvad-code-signing.asc + +# Verify PGP signature +gpg --verify mullvad-vpn-linux-latest.deb.sig mullvad-vpn-linux-latest.deb + +# Check the signature verification result +if [ $? -eq 0 ]; then + echo "PGP signature is verified successfully." +else + echo "PGP signature verification failed. Exiting..." + exit 1 +fi + +# Install Mullvad VPN client +sudo dpkg -i mullvad-vpn-linux-latest.deb +sudo apt-get install -f -y + +# Start the Mullvad VPN client +sudo systemctl start mullvad-daemon + +# Enable the Mullvad VPN client to start on boot +sudo systemctl enable mullvad-daemon + +# Display the status of the Mullvad VPN connection +sudo mullvad status + +echo "Mullvad VPN has been installed, PGP signature verified, and started successfully." + +# Delete the downloaded .deb and .sig files +rm mullvad-code-signing.asc mullvad-vpn-linux-latest.deb mullvad-vpn-linux-latest.deb.sig + +echo "Downloaded .deb and .sig files have been deleted."