From 435076bbb0f6d69c15510e08f6698c61524d011c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 22 Feb 2023 15:01:58 +0000 Subject: [PATCH] misc-progs: Kill OpenVPN Authenticator before OpenVPN There used to be a time where the authenticator crashed when the OpenVPN daemon went away which is causing issues. Signed-off-by: Michael Tremer --- src/misc-progs/openvpnctrl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/misc-progs/openvpnctrl.c b/src/misc-progs/openvpnctrl.c index 92b5989e90..f5e12adf0b 100644 --- a/src/misc-progs/openvpnctrl.c +++ b/src/misc-progs/openvpnctrl.c @@ -469,6 +469,9 @@ static void stopAuthenticator() { void stopDaemon(void) { char command[STRING_SIZE]; + // Stop OpenVPN authenticator + stopAuthenticator(); + int pid = readPidFile("/var/run/openvpn.pid"); if (!pid > 0) { exit(1); @@ -479,9 +482,6 @@ void stopDaemon(void) { snprintf(command, STRING_SIZE - 1, "/bin/rm -f /var/run/openvpn.pid"); executeCommand(command); - - // Stop OpenVPN authenticator - stopAuthenticator(); } static int startAuthenticator(void) { -- 2.47.3