mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 14:16:31 +00:00
fwupdate: remove downloaded flag file upon error
This commit is contained in:
parent
9817f83d69
commit
16a17ec158
@ -289,12 +289,14 @@ function do_download() {
|
||||
|
||||
if [[ -z "${url}" ]]; then
|
||||
echo "no such version" 1>&2
|
||||
rm ${DOWNLOAD_STARTED_FILE}
|
||||
exit 1
|
||||
fi
|
||||
|
||||
free_disk=$(df /data | tail -n 1 | tr -s ' ' | cut -d ' ' -f 4)
|
||||
if [[ "${free_disk}" -lt $((MIN_FREE_DISK * 1024)) ]]; then
|
||||
echo "not enough disk space" 1>&2
|
||||
rm ${DOWNLOAD_STARTED_FILE}
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -320,6 +322,7 @@ function do_download() {
|
||||
|
||||
if [[ "$?" != 0 ]]; then
|
||||
cat ${CURL_LOG_FILE}
|
||||
rm ${DOWNLOAD_STARTED_FILE}
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user