Prepare for a new script for files probe

This commit is contained in:
Jeremy Gardais 2019-10-09 10:10:31 +02:00
parent 8ea0830cda
commit 4e31c4ffa8
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# Purpose {{{ # Purpose {{{
## If Xymon server says that a probe is in error on a remote host, try to call the appropriate script. ## If Xymon server says that a probe is in error on a remote host, try to call the appropriate script.
## For debugging messages, you can check xymon's logs (/var/log/xymon/alert.log ## For debugging messages, you can check xymon's logs (/var/log/xymon/alert.log)
## How-to use: {{{ ## How-to use: {{{
### Define an alert in Xymon configuration file (/etc/xymon/alerts.cfg) ### Define an alert in Xymon configuration file (/etc/xymon/alerts.cfg)
@ -15,6 +15,7 @@ DEBUG=1
script_path="$(dirname -- ${0})" script_path="$(dirname -- ${0})"
script_apt="${script_path}/xymon.apt.alert.sh" script_apt="${script_path}/xymon.apt.alert.sh"
script_files="${script_path}/xymon.files.alert.sh"
script_libs="${script_path}/xymon.libs.alert.sh" script_libs="${script_path}/xymon.libs.alert.sh"
script_procs="${script_path}/xymon.procs.alert.sh" script_procs="${script_path}/xymon.procs.alert.sh"
# }}} # }}}
@ -26,6 +27,9 @@ case "${BBSVCNAME}" in
'apt' ) 'apt' )
script_to_run="${script_apt}" script_to_run="${script_apt}"
;; ;;
'files' )
script_to_run="${script_files}"
;;
'libs' ) 'libs' )
script_to_run="${script_libs}" script_to_run="${script_libs}"
;; ;;
@ -39,7 +43,6 @@ case "${BBSVCNAME}" in
esac esac
# }}} # }}}
# Call the next script if managed {{{ # Call the next script if managed {{{
if [ "${script_to_run}" != "NOT.MANAGED" ]; then if [ "${script_to_run}" != "NOT.MANAGED" ]; then
# Export vars {{{ # Export vars {{{