Move _smarctl_support_result file to XYMONTMP dir

This commit is contained in:
Jeremy Gardais 2020-03-04 11:00:34 +01:00
parent ac0d619cd7
commit d6befb67e2
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 6 additions and 3 deletions

View File

@ -50,7 +50,7 @@ is_disk_support_smart() {
_disk="${1}"
_type="${2}"
_smarctl_support_result="/tmp/dsupport.$(basename "${_disk}")"
_smarctl_support_result="${XYMONTMP}/${MACHINEDOTS}.smartoverall.support.$(basename "${_disk}")"
smart_support_msg=""
@ -81,7 +81,10 @@ is_disk_support_smart() {
[ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "DEBUG: is_disk_support_smart func SMART is not fully supported on: ${_disk} with ${_type} type. See smartctl informations:\n${smart_support_msg}"
fi
rm -f -- "${_smarctl_support_result}"
## Clean temp files
### As the Xymon's tmpdir is used to store log files, no need to delete them at
### the end of the script. They will be emptied at the beginning of the next run.
}
## ]]]
## Test the type of disk with smartctl [[[
@ -232,7 +235,7 @@ $(< "${plugin_state}" cut -c2-)
==================== Detailed status ====================
$(cat /tmp/dres)
$(cat "${plugin_result}")
"
# Clean temp files