Add Pre and Post Hooks for /scripts/restartsrv_* Scripts
As a server administrator I would like cPanel to add Pre- and Post- hooks for service restarts to allow integrators and advanced users to trigger actions around service restarts.
----------------------
This could be implemented either using the Manage Hooks feature in WHM or by the creation of a script following a predetermined naming scheme like the examples below.
Pre service restart script examples:
- /scripts/pre_restartsrv_httpd
- /scripts/pre_restartsrv_mysqld
Post service restart script examples
- /scripts/post_restartsrv_httpd
- /scripts/post_restartsrv_mysqld
The idea here obviously is that simply having the scripts present will lead to them being invoked when the corresponding restartsrv script is run.
Regardless of the method used to implement this functionality it's important that cPanel give it's more advanced users and developers the ability to properly manage the events that need to occur when starting, stopping and restarting services.
Replies have been locked on this page!