mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-09 17:28:31 +00:00
BabyBuddy: Harden update script (#15642)
Ensure cleanup runs from `/opt/babybuddy` before deleting old files, add `--` to the removal command for safer argument handling, and run `manage.py makemigrations` before `migrate` so database updates are applied reliably during upgrades.
This commit is contained in:
parent
e64f5a041d
commit
6e55269d9f
1 changed files with 3 additions and 1 deletions
|
|
@ -40,7 +40,8 @@ function update_script() {
|
|||
create_backup /opt/babybuddy/babybuddy/settings/production.py
|
||||
|
||||
msg_info "Cleaning old files"
|
||||
find . -mindepth 1 -maxdepth 1 ! -name '.venv' -exec rm -rf {} +
|
||||
cd /opt/babybuddy || exit
|
||||
find . -mindepth 1 -maxdepth 1 ! -name '.venv' -exec rm -rf -- {} +
|
||||
msg_ok "Cleaned old files"
|
||||
|
||||
fetch_and_deploy_gh_release "babybuddy" "babybuddy/babybuddy" "tarball"
|
||||
|
|
@ -51,6 +52,7 @@ function update_script() {
|
|||
source .venv/bin/activate
|
||||
$STD uv pip install -r requirements.txt
|
||||
export DJANGO_SETTINGS_MODULE=babybuddy.settings.production
|
||||
$STD python manage.py makemigrations
|
||||
$STD python manage.py migrate
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue