aboutsummaryrefslogtreecommitdiffstats
path: root/roles/_workstation/sysconf/templates/etc-apm-resume
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-05-06 20:54:24 +0200
committerRomain Gonçalves <me@rgoncalves.se>2021-05-06 20:54:24 +0200
commitf1c879a4e620038369b102603c5b213f9538a708 (patch)
treefb4b1c37f6af26689f2af916ef199acf5023e4f7 /roles/_workstation/sysconf/templates/etc-apm-resume
parent8b4d40bb3f0238925c7af0a8a449ac5942cee0b9 (diff)
downloadinfrastructure-f1c879a4e620038369b102603c5b213f9538a708.tar.gz
roles/_workstation: Fix apm/resume execution
Diffstat (limited to 'roles/_workstation/sysconf/templates/etc-apm-resume')
-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.