upgrade-mullvad-vpn/upgrade-mullvad-vpn.sh
2023-07-02 00:21:00 +01:00

41 lines
1.2 KiB
Bash
Executable File

#!/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."