File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
root/etc/s6-overlay/s6-rc.d/init-netbox-config Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ mv /defaults/uwsgi.ini /app/netbox/netbox/uwsgi.ini > /dev/null 2>&1
53
53
if [[ ! -e "/app/netbox/netbox/project-static/docs/index.html" ]]; then
54
54
cd /app/netbox || exit 1
55
55
echo "Building local documentation"
56
- mkdocs build
56
+ mkdocs build -q
57
57
cd /app/netbox/netbox || exit 1
58
58
fi
59
59
@@ -66,13 +66,13 @@ s6-setuidgid abc python3 ./manage.py migrate
66
66
67
67
if [[ -n "$SUPERUSER_EMAIL" ]] && [[ -n "$SUPERUSER_PASSWORD" ]]; then
68
68
cat << EOF | s6-setuidgid abc python3 /app/netbox/netbox/manage.py shell
69
- from django.contrib.auth. models import User;
69
+ from users. models import Token, User;
70
70
71
71
username = 'admin';
72
72
password = '$SUPERUSER_PASSWORD';
73
73
email = '$SUPERUSER_EMAIL';
74
74
75
- if User.objects.filter(username=username).count()==0 :
75
+ if not User.objects.filter(username='admin') :
76
76
User.objects.create_superuser(username, email, password);
77
77
print('Superuser created.');
78
78
else:
You can’t perform that action at this time.
0 commit comments