aboutsummaryrefslogtreecommitdiffstats
path: root/roles/_workstation/sysconf/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/_workstation/sysconf/templates')
-rwxr-xr-xroles/_workstation/sysconf/templates/etc-apm-resume15
1 files changed, 11 insertions, 4 deletions
diff --git a/roles/_workstation/sysconf/templates/etc-apm-resume b/roles/_workstation/sysconf/templates/etc-apm-resume
index e2bd5e0..7680aa6 100755
--- a/roles/_workstation/sysconf/templates/etc-apm-resume
+++ b/roles/_workstation/sysconf/templates/etc-apm-resume
@@ -1,7 +1,14 @@
-#!/bin/sh
+#!/bin/sh -x
sleep 3
-wg-quick down dc0
-ifconfig destroy wg0
+
sh /etc/netstart iwn0
-wg-quick up dc0
+
+wg_interfaces=$(find /etc/wireguard -type f | sed 's/\.conf$//g')
+for wg_interface in ${wg_interfaces}; do
+ wg_interface=$(basename "${wg_interface}")
+ wg-quick down "${wg_interface}"
+ wg-quick up "${wg_interface}"
+done
+
+rcctl -d restart pcscd
remember that computers suck.