mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
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 <michael.tremer@ipfire.org>
This commit is contained in:
@@ -469,6 +469,9 @@ static void stopAuthenticator() {
|
|||||||
void stopDaemon(void) {
|
void stopDaemon(void) {
|
||||||
char command[STRING_SIZE];
|
char command[STRING_SIZE];
|
||||||
|
|
||||||
|
// Stop OpenVPN authenticator
|
||||||
|
stopAuthenticator();
|
||||||
|
|
||||||
int pid = readPidFile("/var/run/openvpn.pid");
|
int pid = readPidFile("/var/run/openvpn.pid");
|
||||||
if (!pid > 0) {
|
if (!pid > 0) {
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -479,9 +482,6 @@ void stopDaemon(void) {
|
|||||||
|
|
||||||
snprintf(command, STRING_SIZE - 1, "/bin/rm -f /var/run/openvpn.pid");
|
snprintf(command, STRING_SIZE - 1, "/bin/rm -f /var/run/openvpn.pid");
|
||||||
executeCommand(command);
|
executeCommand(command);
|
||||||
|
|
||||||
// Stop OpenVPN authenticator
|
|
||||||
stopAuthenticator();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int startAuthenticator(void) {
|
static int startAuthenticator(void) {
|
||||||
|
|||||||
Reference in New Issue
Block a user