polybar and wireguard utilities addition.
This commit is contained in:
17
bin/wgX.sh
Executable file
17
bin/wgX.sh
Executable 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
|
||||
Reference in New Issue
Block a user