__netbox: add mange.py calls recommended from upstream

Calls where added because there are used upstream in the
`upgrade.sh`-Script, too.

Upgrade-Script:
  https://github.com/netbox-community/netbox/blob/develop/upgrade.sh
This commit is contained in:
matze 2020-09-28 20:04:22 +02:00
parent b55186544f
commit 050812305b

View file

@ -64,11 +64,17 @@ EOF
# Set final permissions. # Set final permissions.
chown -R netbox /opt/netbox chown -R netbox /opt/netbox
# NetBox manage scripts
# Run database migrations. # Run database migrations.
sudo -u netbox /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py migrate sudo -u netbox /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py migrate
# Generate static assets. # Generate static assets.
sudo -u netbox /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py collectstatic --no-input sudo -u netbox /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py collectstatic --no-input
# Delete any stale content types
sudo -u netbox /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py remove_stale_contenttypes --no-input
# Delete any expired user sessions
sudo -u netbox /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py clearsessions
# Clear all cached data
sudo -u netbox /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py invalidate all
# Remove temporary working directory. # Remove temporary working directory.
cd / cd /