check_oracle_health: update to 2.1.3
[omd.git] / packages / mod-gearman / GEARMAN_WORKER.hook
blobb921b881d7a1caff0e7408e7fa3837f465d5c58b
1 #!/bin/bash
3 # Alias: Mod-Gearman Worker
4 # Menu: Distributed Monitoring
5 # Description:
6 # You need at least one Worker to make distributed monitoring with
7 # Mod-Gearman work. The worker does not have to be on the same host
8 # like nagios. You can add more worker to spread the load even
9 # further.
10 case "$1" in
11 default)
12 echo "on"
14 choices)
15 echo "on: enable worker"
16 echo "off: disable worker"
18 set)
19 if [ "$2" = "on" -o "$CONFIG_MOD_GEARMAN" = "on" ]; then
20 # generate random key
21 mkdir -p $OMD_ROOT/etc/mod-gearman
22 KEYSTORE="$OMD_ROOT/etc/mod-gearman/secret.key"
23 if [ ! -s $KEYSTORE ]; then
24 key=`head -n 20 /dev/urandom | tr -d -c "[:alnum:]"`
25 echo ${key:0:32} > $KEYSTORE
29 depends)
30 [ "$CONFIG_MOD_GEARMAN" = "on" ]
32 esac