Files
winget.pro/bin/git-update.sh
T
2021-12-15 07:52:33 +01:00

18 lines
590 B
Bash
Executable File

#!/bin/bash
cd /srv
git pull
venv/bin/pip install -U pip | grep -v "^Requirement already satisfied"
venv/bin/pip install -Ur requirements/base-full.txt | grep -v "^Requirement already satisfied"
su -c '/srv/bin/manage.sh migrate | grep -v "INFO\|DEBUG"' - django
su -c '/srv/bin/manage.sh collectstatic --noinput | grep -v "INFO\|DEBUG"' - django
echo `date +%H:%M:%S`': Reloading web server...'
# Reload gunicorn:
supervisorctl status gunicorn | sed "s/.*[pid ]\([0-9]\+\)\,.*/\1/" | xargs kill -HUP
# Reload Nginx:
nginx -s reload
echo `date +%H:%M:%S`': Web server reload complete.'