mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
unboundctrl: Add support for calling reload.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -19,14 +19,16 @@ int main(int argc, char *argv[]) {
|
||||
exit(1);
|
||||
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "\nNo argument given.\n\nunboundctrl (restart)\n\n");
|
||||
fprintf(stderr, "\nNo argument given.\n\nunboundctrl restart|reload\n\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (strcmp(argv[1], "restart") == 0) {
|
||||
safe_system("/etc/rc.d/init.d/unbound restart");
|
||||
} else if (strcmp(argv[1], "reload") == 0) {
|
||||
safe_system("/etc/rc.d/init.d/unbound reload");
|
||||
} else {
|
||||
fprintf(stderr, "\nBad argument given.\n\nunboundctrl (restart)\n\n");
|
||||
fprintf(stderr, "\nBad argument given.\n\nunboundctrl restart|reload\n\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user