From f1c879a4e620038369b102603c5b213f9538a708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Thu, 6 May 2021 20:54:24 +0200 Subject: roles/_workstation: Fix apm/resume execution --- roles/_workstation/sysconf/templates/etc-apm-resume | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'roles/_workstation/sysconf/templates') 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 -- cgit v1.2.3