__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:
parent
b55186544f
commit
050812305b
1 changed files with 7 additions and 1 deletions
|
@ -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 /
|
||||||
|
|
Loading…
Reference in a new issue