]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
openvpnctrl: Remove PID file after an openvpn process was killed.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Jun 2011 18:02:31 +0000 (20:02 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Jun 2011 18:02:31 +0000 (20:02 +0200)
src/misc-progs/openvpnctrl.c

index 1a40c9a6129beddff13c89b944f0a51bacfbcadd..ddda6125d22490e08f7c75fc9d55df87da7e9b02 100644 (file)
@@ -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);
 }