blob: a4f844c9ae4a0fd665e5a1c2042e85625b2b5c2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
set -e
cd "/opt/netbox"
# Apply any database migrations
/sbin/su-exec netbox python3 netbox/manage.py migrate
# Trace any missing cable paths (not typically needed)
/sbin/su-exec netbox python3 netbox/manage.py trace_paths --no-input
# Delete any stale content types
/sbin/su-exec netbox python3 netbox/manage.py remove_stale_contenttypes --no-input
# Delete any expired user sessions
/sbin/su-exec netbox python3 netbox/manage.py clearsessions
# Clear all cached data
/sbin/su-exec netbox python3 netbox/manage.py invalidate all
exec "$@"
|