]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/misc-progs/qosctrl.c
f3b288bcda5f72f24fb7252301d0572a3010ddc3
1 /* This file is part of the IPFire Firewall.
3 * This program is distributed under the terms of the GNU General Public
4 * Licence. See the file COPYING for details.
12 #include <sys/types.h>
16 int main(int argc
, char *argv
[]) {
25 fprintf(stderr
, "\nNo argument given.\n\nqosctrl (start|stop|restart|status)\n\n");
29 safe_system("chmod 755 /var/ipfire/qos/bin/qos.sh");
30 if (strcmp(argv
[1], "start") == 0) {
31 if ((fd
= open("/var/ipfire/qos/bin/qos.sh", O_RDONLY
)) != -1)
38 safe_system("/var/ipfire/qos/bin/qos.sh start");
40 } else if (strcmp(argv
[1], "stop") == 0) {
41 safe_system("/var/ipfire/qos/bin/qos.sh clear");
42 } else if (strcmp(argv
[1], "status") == 0) {
43 safe_system("/var/ipfire/qos/bin/qos.sh status");
44 } else if (strcmp(argv
[1], "restart") == 0) {
45 safe_system("/var/ipfire/qos/bin/qos.sh restart");
47 fprintf(stderr
, "\nBad argument given.\n\nqosctrl (start|stop|restart|status)\n\n");