mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 08:24:43 +07:00
Make sure to always run HOOK_SVC_RECONF when services have been stopped.
Previously `HOOK_SVC_RECONF` was only called on `initctl reload`, now we also call it on `initctl emit "STOP"`. This seems like a good idea atm, hopefully it will remain a good idea. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -368,6 +368,9 @@ void service_stop_dynamic(void)
|
||||
if (svc_is_changed(svc))
|
||||
service_stop(svc);
|
||||
}
|
||||
|
||||
_d("All disabled/removed services have been stoppped, calling reconf hooks ...");
|
||||
plugin_run_hooks(HOOK_SVC_RECONF); /* Reconfigure HW/VLANs/etc here */
|
||||
}
|
||||
|
||||
/* stop + start */
|
||||
@@ -431,9 +434,6 @@ void service_reload_dynamic(void)
|
||||
/* Then stop any disabled/removed services and non-reloadable */
|
||||
service_stop_dynamic();
|
||||
|
||||
_d("All disabled/removed services have been stoppped, calling reconf hooks ...");
|
||||
plugin_run_hooks(HOOK_SVC_RECONF); /* Reconfigure HW/VLANs/etc here */
|
||||
|
||||
/* Finish off by starting/reload modified/new services */
|
||||
service_start_dynamic();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user