mirror of
https://github.com/troglobit/finit.git
synced 2026-10-25 12:04:36 +00:00
Refactor: Cleanup and expand client code to support <version|q|reload|debug>
Further refactoring of the client code. Supported commands: - debug: Toggle PID 1 debug flag - version: Show Finit version or custom header string - reload: Reload config files in /etc/finit.d/, same as SIGHUP Also supported is the legacy 'init q' command, to reload config. The 'status' command now supports an optiona '-v', either as an argument to init itself, or as argument to the command. When it is given 'status' lists verbose information about all services. Currently only the service arguments are listed. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
811bd75eab
commit
2026486fda
9 files changed
+233
-145
No files matched your search
@@ -93,17 +93,7 @@ void do_shutdown(int sig)
|
||||
*/
|
||||
static void sighup_cb(uev_ctx_t *UNUSED(ctx), uev_t *UNUSED(w), void *UNUSED(arg), int UNUSED(events))
|
||||
{
|
||||
/* Mark and sweep */
|
||||
svc_mark_dynamic();
|
||||
|
||||
/* Reload all *.conf in /etc/finit.d/ */
|
||||
parse_finit_d(rcsd);
|
||||
|
||||
/* Reload dirty services */
|
||||
service_reload_dynamic();
|
||||
|
||||
/* Cleanup stale services */
|
||||
svc_clean_dynamic(service_unregister);
|
||||
reload_finit_d();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user