Add AdGuardHome new version as a suffix

This commit is contained in:
Jeremy Gardais 2022-01-27 14:29:48 +01:00
parent 15589b0a0c
commit 74a240f986
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 2 additions and 4 deletions

View File

@ -199,11 +199,9 @@ Create ${adguard_new_version_file} temp file to monitore."
if is_var_nonempty "${adguard_new_version_url}"; then if is_var_nonempty "${adguard_new_version_url}"; then
debug_message "Download AdGuard Home new version \ debug_message "Download AdGuard Home new version \
Download new archive from ${adguard_new_version_url} and extract to /tmp/ ." Download new archive from ${adguard_new_version_url} and extract to /tmp/ ."
#wget --quiet "${adguard_new_version_url}" -O - | tar xz --transform="s/AdGuardHome/AdGuardHome.to.upgrade/g" --strip-components 2
wget --quiet "${adguard_new_version_url}" -O - | tar --extract --gzip --directory=/tmp --strip-components 2 ./AdGuardHome wget --quiet "${adguard_new_version_url}" -O - | tar --extract --gzip --directory=/tmp --strip-components 2 ./AdGuardHome
#mv AdGuardHome.to.upgrade "${adguard_bin}.to.upgrade" mv --force /tmp/AdGuardHome "${adguard_bin}.to.upgrade.${adguard_new_version}" \
mv --force /tmp/AdGuardHome "${adguard_bin}.to.upgrade" \ || error_message "Can't move /tmp/AdGuardHome to ${adguard_bin}.to.upgrade.${adguard_new_version} ." 4
|| error_message "Can't move /tmp/AdGuardHome to ${adguard_bin}.to.upgrade ." 4
fi fi
## }}} ## }}}