firewall: Move scripts from /var/ipfire/firewall/bin to /usr/lib/firewall.
[people/teissler/ipfire-2.x.git] / src / misc-progs / firewallctrl.c
1 /* This file is part of the IPFire Firewall.
2 *
3 * This program is distributed under the terms of the GNU General Public
4 * Licence. See the file COPYING for details.
5 *
6 */
7
8 #include <unistd.h>
9
10 #include "setuid.h"
11
12 int main(int argc, char *argv[]) {
13 if (!(initsetuid()))
14 exit(1);
15
16 int retval = safe_system("/usr/lib/firewall/rules.pl");
17
18 /* If rules.pl has been successfully executed, the indicator
19 * file is removed. */
20 if (retval == 0) {
21 unlink("/var/ipfire/firewall/reread");
22 }
23
24 return 0;
25 }