diff options
author | Mike Crute <mike@crute.us> | 2021-01-27 04:41:00 +0000 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2021-01-27 04:41:00 +0000 |
commit | 763b810ca1a9d755205e49b1246025b83abb5132 (patch) | |
tree | 923df4e956b36ef95e86ff9c51c5bbad26fd076f /netbox/entrypoint.sh | |
parent | cd833bc2852ec204fbaecde7ada56798eba005da (diff) | |
download | dockerfiles-763b810ca1a9d755205e49b1246025b83abb5132.tar.bz2 dockerfiles-763b810ca1a9d755205e49b1246025b83abb5132.tar.xz dockerfiles-763b810ca1a9d755205e49b1246025b83abb5132.zip |
Add netbox
Diffstat (limited to 'netbox/entrypoint.sh')
-rwxr-xr-x | netbox/entrypoint.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/netbox/entrypoint.sh b/netbox/entrypoint.sh new file mode 100755 index 0000000..a4f844c --- /dev/null +++ b/netbox/entrypoint.sh | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | |||
5 | cd "/opt/netbox" | ||
6 | |||
7 | # Apply any database migrations | ||
8 | /sbin/su-exec netbox python3 netbox/manage.py migrate | ||
9 | |||
10 | # Trace any missing cable paths (not typically needed) | ||
11 | /sbin/su-exec netbox python3 netbox/manage.py trace_paths --no-input | ||
12 | |||
13 | # Delete any stale content types | ||
14 | /sbin/su-exec netbox python3 netbox/manage.py remove_stale_contenttypes --no-input | ||
15 | |||
16 | # Delete any expired user sessions | ||
17 | /sbin/su-exec netbox python3 netbox/manage.py clearsessions | ||
18 | |||
19 | # Clear all cached data | ||
20 | /sbin/su-exec netbox python3 netbox/manage.py invalidate all | ||
21 | |||
22 | exec "$@" | ||