diff --git a/alist/data.sh b/alist/data.sh index 38a8fdd..c0f4ed0 100644 --- a/alist/data.sh +++ b/alist/data.sh @@ -56,19 +56,25 @@ download_files() { echo "Downloading file $file..." curl -s -o "${DATA_DIR}/${file}" "${remote_url}/${file}" done + return 0 else echo "No need to download files" + return 1 fi } restart_service() { - killall -15 alist + kill -15 $(ps ax | grep 'nginx|httpd|alist' | grep -v grep | awk '{print$1}') sleep 10 /entrypoint.sh /opt/alist/alist server --no-prefix & } update() { download_files + if [ $? -ne 0 ]; then + echo "Failed to download files or no need to update" + return 1 + fi restart_service } diff --git a/helmfile.yaml b/helmfile.yaml index 7775786..3353a64 100644 --- a/helmfile.yaml +++ b/helmfile.yaml @@ -37,6 +37,8 @@ releases: hostPath: path: /opt/xiaoya/data type: DirectoryOrCreate + health: + enabled: false strategy: type: Recreate resources: