feature: reworked wger update script to accomodate new install script

This commit is contained in:
Floris Claessens 2026-02-01 19:24:40 +01:00
parent 3c1bab3ad0
commit 7259c41fd9

View File

@ -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