Isaac
March 29, 2021, 4:02pm
1
I wanted to activate my PIA VPN without touching my trackpad.
Thankfully, they have added Command-Line control to their client app:
Here is the shell script I used as a toggle, I hope it saves someone some time:
#!/bin/bash
case $(piactl get connectionstate) in
Disconnected)
piactl connect
;;
Connected)
piactl disconnect
;;
Interupted)
piactl connect
;;
Disconnecting)
echo "Disconnecting"
;;
DisconnectingToReconnect)
echo "Trying to reconnect now"
;;
*)
piactl connect
;;
esac
2 Likes
For some reason I’m not able to get this to work. Keyboard Maestro doesn’t display the script results like it should though. Is this still working for you? If so, I may need to fix KM.
Isaac
May 16, 2021, 1:50pm
3
Do the commands work for you in the terminal?
Sorry I didn’t know anyone replied. I’ll check when I have a chance later today.
Sorry for forgetting about this. I had to reinstall the OS and the commands work for me now.
Isaac
October 12, 2021, 3:43pm
6
UPDATE:
I have walked away from PIA since posting this.
I am looking into an ALGO - Cloud solution that will be cheaper and I know the players.