Rename logfiles and keep them between each run

This commit is contained in:
Jeremy Gardais 2020-03-04 09:57:20 +01:00
parent 087ccf5068
commit 60217f1eec
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 5 additions and 4 deletions

View File

@ -32,9 +32,9 @@ c_reset='\033[0m'
plugin_name=$(basename "${0}")
plugin_result="${XYMONTMP}/dres"
plugin_state="${XYMONTMP}/dcheck"
device_list="${XYMONTMP}/dscan"
plugin_result="${XYMONTMP}/${MACHINEDOTS}.smartoverall.plugin_result"
plugin_state="${XYMONTMP}/${MACHINEDOTS}.smartoverall.plugin_state"
device_list="${XYMONTMP}/${MACHINEDOTS}.smartoverall.dscan"
# ]]]
@ -227,6 +227,7 @@ $(cat /tmp/dres)
"
# Clean temp files
rm -f -- "${plugin_result}" "${plugin_state}" "${device_list}"
## 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.
exit 0