check_oracle_health: update to 2.1.3
[omd.git] / packages / omd / skel / etc / init-hooks.d / README
blob69bb9feb1b13ff38fbb6eff865d7e9db89e6481d
1 In this directory you can put your own custom scripts which extend the startstop-scripts in etc/init.d
3 The init-hook-scripts are executed by the init-scripts before or after a certain operation. This is defined by following a naming scheme.
5 <name of the init-script>-<name of the operation>-<pre or post>
7 Post scripts will be run with the exit code of the actual script as
8 parameter.
10 Example:
11 nagios-reload-pre will be executed when you run "etc/init.d/nagios reload" or "omd reload nagios" just before the actual reload.
14 Real-live use case:
15  - Imagine your etc/nagios/conf.d/myconfig is the clone of a git repository. Whenever you reload Nagios, the init-hook-script will do a
16    cd etc/nagios/conf.d/myconfig
17    git pull
18    and update the config files from the central repository. Then the actual reload follows.
20  - Apache stops all fcgi servers on stop ( and therefor on logfile
21    rotation ). There is a sample script which start Thruks fcgi daemon
22    after the apache reload.
24 Currently only the following scripts can be used, all others are ignored:
25 nagios-*-pre
26 nagios-start-post
27 nagios-stop-post
28 nagios-reload-post
30 shinken-*-pre
32 icinga-*-pre
33 icinga-start-post
34 icinga-stop-post
35 icinga-reload-post
37 apache-*-pre
38 apache-start-post
39 apache-stop-post
40 apache-reload-post
42 mysql-*-pre
43 mysql-start-post
44 mysql-stop-post
46 npcd-*-pre
47 npcd-start-post
48 npcd-stop-post