mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +02:00
Fix ipsectrl I and ipsectrl R terminate vpn-watch.
This commit is contained in:
@@ -172,6 +172,17 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
FILE *file = NULL;
|
FILE *file = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
if (strcmp(argv[1], "I") == 0) {
|
||||||
|
safe_system("/usr/sbin/ipsec whack --status");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strcmp(argv[1], "R") == 0) {
|
||||||
|
safe_system("/usr/sbin/ipsec whack --rereadall >/dev/null");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
/* Get vpnwatch pid */
|
/* Get vpnwatch pid */
|
||||||
|
|
||||||
if ( (argc == 2) && (file = fopen("/var/run/vpn-watch.pid", "r"))) {
|
if ( (argc == 2) && (file = fopen("/var/run/vpn-watch.pid", "r"))) {
|
||||||
@@ -197,16 +208,6 @@ int main(int argc, char *argv[]) {
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(argv[1], "R") == 0) {
|
|
||||||
safe_system("/usr/sbin/ipsec whack --rereadall >/dev/null");
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strcmp(argv[1], "I") == 0) {
|
|
||||||
safe_system("/usr/sbin/ipsec whack --status");
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* clear iptables vpn rules */
|
/* clear iptables vpn rules */
|
||||||
|
|||||||
Reference in New Issue
Block a user