hook script: service_down_notice.sh

Version 1.53

Feature
Finished

New custom hook script can be created here: /usr/local/directadmin/scripts/custom/service_down_notice.sh which is called in the event that a reload and restart both fail to set a service to be up. This will give you the opportunity to add extra checks/fixes if you know of common issues with the given: $service=servicename eg: $service=httpd If your script thinks it might have fixed the issue, then exit with a return code 0, which tells the datskq to wait 5 seconds to let that service start up before checking if it's running. For all other cases, the script should return a non-zero status, eg: "exit 1" which disables the 5 second wait for the final process check. If the service is not running for the final process check, then the dataskq sends the standard notice to all Admins, eg: "The service 'servicename' on server your.host.com is currently down" In the even your script is called, all relevant logs will be loaded with the result: try_to_fix_process(%s): error: %s or try_to_fix_process(%s): success: %s where the first %s is loaded with the service name (eg: httpd) and the second %s is filled with any echo/output your script generates from stdout + stderr.

Interested to try DirectAdmin? Get a 30-day Free Trial!