This commit is contained in:
qiaofeng1227 2023-10-30 16:55:03 +08:00
parent 6a348cb994
commit 6a31c259d4
3 changed files with 5 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# modify time: 202310301631, you can modify here to trigger Docker Build action
# modify time: 202310301700, you can modify here to trigger Docker Build action
FROM python:3.10-slim-bullseye
LABEL maintainer="Websoft9<help@websoft9.com>"

View File

@ -3,7 +3,7 @@
echo "$(date) - Compare remote version and local version." | tee -a /var/log/supervisord.log
echo "$(date) - Download remote packages and replace local data." | tee -a /var/log/supervisord.log
bash /websoft9/script/update_zip.sh --package_name "media.zip" --sync_to "/websoft9/media"
bash /websoft9/script/update_zip.sh --package_name "docker-library.zip" --sync_to "/websoft9/library"
bash /websoft9/script/update_zip.sh --package_name "media-latest.zip" --sync_to "/websoft9/media"
bash /websoft9/script/update_zip.sh --package_name "library-latest.zip" --sync_to "/websoft9/library"
echo "$(date) - Success to update library and media."

View File

@ -51,14 +51,10 @@ fi
artifact_url="https://w9artifact.blob.core.windows.net/$channel/websoft9/plugin"
upgrade_zip() {
# Check if the correct number of arguments were passed
if [ "$#" -ne 2 ]; then
echo "Usage: download_package <name> <sync_to>"
return 1
fi
# Create the full URL by appending the package name to the artifact URL
local url="$artifact_url/$package_name"
local plugin_name=${package_name%%-*}
local url="$artifact_url/$plugin_name/$package_name"
# Initialize download attempts
local attempts=0