summaryrefslogtreecommitdiff
path: root/playbooks.d
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks.d')
-rw-r--r--playbooks.d/vpn-wireguard/playbook.bash5
1 files changed, 4 insertions, 1 deletions
diff --git a/playbooks.d/vpn-wireguard/playbook.bash b/playbooks.d/vpn-wireguard/playbook.bash
index 22addf6..8fc8128 100644
--- a/playbooks.d/vpn-wireguard/playbook.bash
+++ b/playbooks.d/vpn-wireguard/playbook.bash
@@ -39,6 +39,7 @@ playbook_add() {
playbook_sync
# Enable the wireguard interface
+ info "$BASHTARD_PLAYBOOK" "Enabling wireguard interface $interface"
systemctl enable --now "wg-quick@$interface.service"
}
@@ -91,6 +92,7 @@ playbook_sync() {
[[ "$BASHTARD_COMMAND" == "add" ]] && return
# Refresh the wireguard interface
+ info "$BASHTARD_PLAYBOOK" "Reloading wireguard interface $interface"
systemctl reload "wg-quick@$interface.service"
}
@@ -99,7 +101,8 @@ playbook_del() {
interface="$(config "$BASHTARD_PLAYBOOK.interface" "wg0")"
+ info "$BASHTARD_PLAYBOOK" "Disabling wireguard interface $interface"
systemctl disable --now "wg-quick@$interface.service"
- rm -f -- "$(config "fs.etcdir")/wireguard/$interface.conf"
+ rm -fv -- "$(config "fs.etcdir")/wireguard/$interface.conf"
pkg uninstall wireguard
}