diff --git a/src/misc-progs/openvpnctrl.c b/src/misc-progs/openvpnctrl.c index 1a40c9a61..ddda6125d 100644 --- a/src/misc-progs/openvpnctrl.c +++ b/src/misc-progs/openvpnctrl.c @@ -466,6 +466,10 @@ void killNet2Net(char *name) { fprintf(stderr, "Killing PID %d.\n", pid); kill(pid, SIGTERM); + char command[STRING_SIZE]; + snprintf(command, STRING_SIZE - 1, "/bin/rm -f %s", pidfile); + executeCommand(command); + exit(0); }