Last active
April 30, 2020 20:48
-
-
Save yzdann/18ac4f528c48e3472bd0bf82d312af36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp wg-up-down.sh /usr/loca/bin/wg-up-down | |
chmod +x /usr/local/bin/wg-up-down | |
# set img | |
# add .desktop to ~/.config/xfce4/panel/launcher-x/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# we can go with || but readability counts :) | |
CONFIG_NAME="wg0" | |
ip r | grep $CONFIG_NAME > /dev/null | |
exit_status=$? | |
if [ $exit_status -eq 0 ]; then | |
wg-quick down $CONFIG_NAME | |
exit 0 | |
fi | |
wg-quick up $CONFIG_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Name=WireGuard | |
Comment= | |
Exec=sudo wg-up-down | |
Icon=/home/yzdann/Pictures/icon/wireguard.png | |
Path= | |
Terminal=true | |
StartupNotify=false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment