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
|
if [[ -z "${url}" ]]; then
|
||||||
echo "no such version" 1>&2
|
echo "no such version" 1>&2
|
||||||
|
rm ${DOWNLOAD_STARTED_FILE}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
free_disk=$(df /data | tail -n 1 | tr -s ' ' | cut -d ' ' -f 4)
|
free_disk=$(df /data | tail -n 1 | tr -s ' ' | cut -d ' ' -f 4)
|
||||||
if [[ "${free_disk}" -lt $((MIN_FREE_DISK * 1024)) ]]; then
|
if [[ "${free_disk}" -lt $((MIN_FREE_DISK * 1024)) ]]; then
|
||||||
echo "not enough disk space" 1>&2
|
echo "not enough disk space" 1>&2
|
||||||
|
rm ${DOWNLOAD_STARTED_FILE}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -320,6 +322,7 @@ function do_download() {
|
|||||||
|
|
||||||
if [[ "$?" != 0 ]]; then
|
if [[ "$?" != 0 ]]; then
|
||||||
cat ${CURL_LOG_FILE}
|
cat ${CURL_LOG_FILE}
|
||||||
|
rm ${DOWNLOAD_STARTED_FILE}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user