polybar and wireguard utilities addition.

This commit is contained in:
2018-12-03 15:22:40 -02:00
parent 6224ae8e3e
commit 415a369096
3 changed files with 48 additions and 3 deletions

17
bin/wgX.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
verb=$1
iface=$(basename $0)
if [ -z "$verb" ]; then
verb=status;
fi
if [ "$verb" = "up" ] || [ "$verb" = "down" ]; then
sudo wg-quick $verb /etc/wireguard/${iface}.conf;
fi
if [ "$verb" = "status" ] || [ "$verb" = "start" ] || [ "$verb" = "stop" ]; then
sudo systemctl $verb wg-quick@${iface}.service;
fi