I need a script to shutdown ExpressVPN through the Terminal on Shutdown.
Previously, I created a startup script that I cobbled together from scripts that people had posted on various websites. The script is set to launch 25-seconds delay in order for the other startup apps to begin running. This script works quite well, and I have no issues with it at all. The script (ExpressVPNStart.sh) is located in my Home directory.
I am running Linux Mint 19.1 with Cinnamon desktop on my 11-year old Sony Vaio laptop. The startup script I am running (expressvpnstart.sh) is located in my Home folder.
!/bin/sh expressvpn connect Netherlands @reboot ( sleep 25 ; sh /home/mederia/expressvpnstart.sh
The setup instructions I followed to install ExpressVPN is located in the following link: [https://www.expressvpn.com/support/vpn-setup/manual-config-for-linux-with-openvpn/]
There is another method to install ExpressVPN through the Network Manager, but I previously tried that method with CyberGhost before I purchsed ExpressVPN. I was never able to stop the DNS leak I had installing it that way. Using the Terminal method, my DNS leak stopped immediately (ExpressVPN).
My startup script works with no issues at all! I just want an shutdown script to automatically shutdown ExpressVPN when I press the Shutdown button on my computer.
Note: A proper shutdown of ExpressVPN would be preferable to a hard disconnect by just shutting down my laptop. Presently, I need to open the Terminal and enter ExpressVPN disconnect before I shutdown my computer. I am looking for a script that will shutdown ExpressVPN through the Terminal when I press the Shutdown button in Linux so I do not have to do it manually.