Fix ddc0d42 with basename to get script name...

This commit is contained in:
Jeremy Gardais 2020-02-24 14:31:04 +01:00
parent 128865f877
commit 3e52ecdd31
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 4 additions and 1 deletions

View File

@ -28,6 +28,9 @@ c_redb='\033[1;31m'
c_magentab='\033[1;35m'
c_reset='\033[0m'
## }}}
plugin_name=$(basename "${0}")
# }}}
# Functions
@ -206,7 +209,7 @@ fi
COLOR=$(< /tmp/dcheck awk '{print $1}' | sort | uniq | head -1 | cut -c3-)
# Send informations to Xymon server
$XYMON "${XYMSRV}" "status ${MACHINE}.${0} ${COLOR} SMART health check
$XYMON "${XYMSRV}" "status ${MACHINE}.${plugin_name} ${COLOR} SMART health check
$(< /tmp/dcheck cut -c2-)