diff --git a/ct/wger.sh b/ct/wger.sh index 8629b4de3..00f42d8c6 100644 --- a/ct/wger.sh +++ b/ct/wger.sh @@ -31,7 +31,7 @@ function update_script() { if check_for_gh_release "wger" "wger-project/wger"; then msg_info "Stopping Service" - systemctl stop apache2 + systemctl stop redis-server nginx celery celery-beat wger msg_ok "Stopped Service" msg_info "Backing up Data" @@ -45,6 +45,10 @@ function update_script() { cp -r /opt/wger_media_backup/. /opt/wger/media cp /opt/wger_env_backup /opt/wger/.env rm -rf /opt/wger_media_backup /opt/wger_env_backup + + set -a + source /opt/wger/.env + set +a msg_ok "Restored Data" msg_info "Updating wger" @@ -52,13 +56,14 @@ function update_script() { set -a && source /opt/wger/.env && set +a export DJANGO_SETTINGS_MODULE=settings.main $STD uv pip install . + $STD uv pip install gunicorn celery django-redis psycopg2-binary $STD uv run python manage.py migrate $STD uv run python manage.py collectstatic --no-input msg_ok "Updated wger" - msg_info "Starting Service" - systemctl start apache2 - msg_ok "Started Service" + msg_info "Starting Services" + systemctl start redis-server nginx celery celery-beat wger + msg_ok "Started Services" msg_ok "Updated Successfully" fi exit