dotfiles/home/bin/executable_linux-toggle-vpn

10 lines
176 B
Bash

#!/usr/bin/env bash
if [ -f ~/.wg0 ]; then
sudo systemctl stop wg-quick-wg0.service
rm ~/.wg0
else
sudo systemctl restart wg-quick-wg0.service
touch ~/.wg0
fi