dotfiles/scripts/prefix/bin/vpn

13 lines
219 B
Bash
Executable File

#!/bin/sh
PROFILE=$(hostname)
sudo systemctl stop openvpn-client@$PROFILE.service
if [[ $1 = "on" ]]
then
sudo systemctl start openvpn-client@$PROFILE.service
echo "$PROFILE started"
else
echo "All stopped."
fi