Skip to content

Commit

Permalink
Merge pull request #11 from monlor/test
Browse files Browse the repository at this point in the history
  • Loading branch information
monlor authored Jun 1, 2024
2 parents 14bc8ed + 02de98b commit 415453c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion alist/data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 2 additions & 0 deletions helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ releases:
hostPath:
path: /opt/xiaoya/data
type: DirectoryOrCreate
health:
enabled: false
strategy:
type: Recreate
resources:
Expand Down

0 comments on commit 415453c

Please sign in to comment.