diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-05-06 20:54:24 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-05-06 20:54:24 +0200 |
commit | f1c879a4e620038369b102603c5b213f9538a708 (patch) | |
tree | fb4b1c37f6af26689f2af916ef199acf5023e4f7 /roles | |
parent | 8b4d40bb3f0238925c7af0a8a449ac5942cee0b9 (diff) | |
download | infrastructure-f1c879a4e620038369b102603c5b213f9538a708.tar.gz |
roles/_workstation: Fix apm/resume execution
Diffstat (limited to 'roles')
-rw-r--r-- | roles/_workstation/sysconf/tasks/_openbsd.yml | 1 | ||||
-rwxr-xr-x | roles/_workstation/sysconf/templates/etc-apm-resume | 15 |
2 files changed, 12 insertions, 4 deletions
diff --git a/roles/_workstation/sysconf/tasks/_openbsd.yml b/roles/_workstation/sysconf/tasks/_openbsd.yml index 74d1b83..d4773a4 100644 --- a/roles/_workstation/sysconf/tasks/_openbsd.yml +++ b/roles/_workstation/sysconf/tasks/_openbsd.yml @@ -35,6 +35,7 @@ template: src: "{{ item }}" dest: "/{{ item | regex_replace('-', '/') }}" + mode: preserve loop: - etc-X11-xorg.conf.d-intel.conf - etc-apm-hibernate 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 |