Skip to content

Commit 8d651b4

Browse files
committed
Update init for v4
1 parent 69625b4 commit 8d651b4

File tree

1 file changed

+3
-3
lines changed
  • root/etc/s6-overlay/s6-rc.d/init-netbox-config

1 file changed

+3
-3
lines changed

root/etc/s6-overlay/s6-rc.d/init-netbox-config/run

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ mv /defaults/uwsgi.ini /app/netbox/netbox/uwsgi.ini > /dev/null 2>&1
5353
if [[ ! -e "/app/netbox/netbox/project-static/docs/index.html" ]]; then
5454
cd /app/netbox || exit 1
5555
echo "Building local documentation"
56-
mkdocs build
56+
mkdocs build -q
5757
cd /app/netbox/netbox || exit 1
5858
fi
5959

@@ -66,13 +66,13 @@ s6-setuidgid abc python3 ./manage.py migrate
6666

6767
if [[ -n "$SUPERUSER_EMAIL" ]] && [[ -n "$SUPERUSER_PASSWORD" ]]; then
6868
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;
7070

7171
username = 'admin';
7272
password = '$SUPERUSER_PASSWORD';
7373
email = '$SUPERUSER_EMAIL';
7474

75-
if User.objects.filter(username=username).count()==0:
75+
if not User.objects.filter(username='admin'):
7676
User.objects.create_superuser(username, email, password);
7777
print('Superuser created.');
7878
else:

0 commit comments

Comments
 (0)