summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2024-01-05 12:17:53 +0100
committerPatrick Spek <p.spek@tyil.nl>2024-01-05 12:17:53 +0100
commite043a333a8830a44e14295b60f0d9b7aa02d2626 (patch)
treeed524490bf53f936ce4c24416b8a7b3bf3c925d8
parent76ec6dd2c3a56fac5f09943a9f7af9f4e2d17682 (diff)
Dont reload service when playbook is being added
-rw-r--r--playbooks.d/vpn-wireguard/playbook.bash3
1 files changed, 3 insertions, 0 deletions
diff --git a/playbooks.d/vpn-wireguard/playbook.bash b/playbooks.d/vpn-wireguard/playbook.bash
index e54eff4..22addf6 100644
--- a/playbooks.d/vpn-wireguard/playbook.bash
+++ b/playbooks.d/vpn-wireguard/playbook.bash
@@ -87,6 +87,9 @@ playbook_sync() {
cat "$path" >> "$wgconf"
done
+ # Don't continue here if this was just part of the add invocation
+ [[ "$BASHTARD_COMMAND" == "add" ]] && return
+
# Refresh the wireguard interface
systemctl reload "wg-quick@$interface.service"
}