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 */
if ( (argc == 2) && (file = fopen("/var/run/vpn-watch.pid", "r"))) {
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 */