Clean temp files after successful upgrade

This commit is contained in:
Jeremy Gardais 2020-06-22 11:08:02 +02:00
parent 17e8e0027d
commit 872bb98950
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 13 additions and 2 deletions

View File

@ -229,6 +229,15 @@ Try to apply Maco upgrade".
/opt/maco/bin/maco.autoupdate.sh
}
# }}}
clean_host() { # {{{
debug_message "clean_host \
Try to clean temp files,…".
rm -f -- "${MACO_TMP_FILE}" "${MACO_TMP_URGENT_FILE}"
}
# }}}
main() { # {{{
@ -273,10 +282,12 @@ main() { # {{{
is_proc_running "${apt_proc_pattern}" \
&& exit 0
## Upgrade Maco
## Try to upgrade Maco
### If error: Exit 50
### If success: Clean host (temp files,…)
upgrade_maco \
|| exit 50
|| exit 50 \
&& clean_host
}
# }}}