PLUGIN_* files are recreated at each run
Only MACO_VERSION_RESULT needs to be kept for ~10 hours (to avoid to mount store.ipr everytime!).
This commit is contained in:
parent
f92520577f
commit
20e4713e56
|
@ -277,8 +277,6 @@ $(cat ${PLUGIN_RESULT})"
|
|||
main() { # {{{
|
||||
|
||||
# Create or empty previous file only if too old
|
||||
regenerate_if_too_old "${PLUGIN_RESULT}"
|
||||
regenerate_if_too_old "${PLUGIN_STATE}"
|
||||
regenerate_if_too_old "${MACO_VERSION_RESULT}"
|
||||
|
||||
## If MACO_VERSION_RESULT file is empty
|
||||
|
@ -287,8 +285,6 @@ main() { # {{{
|
|||
check_maco_version
|
||||
fi
|
||||
|
||||
## If any previous file is empty
|
||||
if is_file_empty "${PLUGIN_RESULT}" || is_file_empty "${PLUGIN_STATE}"; then
|
||||
## Add HTML header for this part
|
||||
add_header "Compare version" >> "${PLUGIN_RESULT}"
|
||||
## Analyze Maco update result (add color,…)
|
||||
|
@ -305,11 +301,12 @@ main() { # {{{
|
|||
add_header "Last update" >> "${PLUGIN_RESULT}"
|
||||
## Check status of last update
|
||||
check_last_update_status
|
||||
fi
|
||||
|
||||
# Send data to Xymon server
|
||||
# Send data to Xymon server then
|
||||
## delete useless files
|
||||
## and exit
|
||||
send_result_to_xymon_server \
|
||||
&& rm -f -- "${PLUGIN_RESULT}" "${PLUGIN_STATE}" \
|
||||
&& exit 0
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue