Added exec

This commit is contained in:
buffet 2018-11-03 16:28:48 +01:00
parent c783cb9290
commit 7b8b64ca04

View file

@ -65,6 +65,10 @@ handle_ipc_event(char *msg)
g_is_about_to_quit = true; g_is_about_to_quit = true;
} else if (STREQ(command, "reload")) { } else if (STREQ(command, "reload")) {
exec_config(); exec_config();
} else if (STREQ(command, "exec")) {
char *command = strtok(NULL, "");
execl("/bin/sh", "/bin/sh", "-c", command, NULL);
g_is_about_to_quit = true;
} else { } else {
warn("ignoring unknown command: %s\n", command); warn("ignoring unknown command: %s\n", command);
} }