File tree Expand file tree Collapse file tree 9 files changed +26
-18
lines changed
root/etc/s6-overlay/s6-rc.d
svc-netbox/dependencies.d Expand file tree Collapse file tree 9 files changed +26
-18
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
333333
334334# # Versions
335335
336+ * ** 26.08.24:** - Restructure init to allow for plugins as mods.
336337* ** 16.07.24:** - Add required packages for LDAP support.
337338* ** 01.06.24:** - Rebase to Alpine 3.20.
338339* ** 23.12.23:** - Rebase to Alpine 3.19.
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ app_setup_block: |
5757
5858# changelog
5959changelogs :
60+ - { date: "26.08.24:", desc: "Restructure init to allow for plugins as mods."}
6061 - { date: "16.07.24:", desc: "Add required packages for LDAP support."}
6162 - { date: "01.06.24:", desc: "Rebase to Alpine 3.20."}
6263 - { date: "23.12.23:", desc: "Rebase to Alpine 3.19."}
Original file line number Diff line number Diff line change 6464lsiown -R abc:abc \
6565 /app/netbox/netbox/static \
6666 /config
67-
68- s6-setuidgid abc python3 ./manage.py migrate
69-
70- if [[ -n "$SUPERUSER_EMAIL" ]] && [[ -n "$SUPERUSER_PASSWORD" ]]; then
71- cat << EOF | s6-setuidgid abc python3 /app/netbox/netbox/manage.py shell
72- from users.models import Token, User;
73-
74- username = 'admin';
75- password = '$SUPERUSER_PASSWORD';
76- email = '$SUPERUSER_EMAIL';
77-
78- if not User.objects.filter(username='admin'):
79- User.objects.create_superuser(username, email, password);
80- print('Superuser created.');
81- else:
82- print('Superuser creation skipped. Already exists.');
83- EOF
84- fi
File renamed without changes.
Original file line number Diff line number Diff line change 1+ #!/usr/bin/with-contenv bash
2+ # shellcheck shell=bash
3+
4+ cd /app/netbox/netbox || exit 1
5+
6+ s6-setuidgid abc python3 ./manage.py migrate
7+
8+ if [[ -n "$SUPERUSER_EMAIL" ]] && [[ -n "$SUPERUSER_PASSWORD" ]]; then
9+ cat << EOF | s6-setuidgid abc python3 /app/netbox/netbox/manage.py shell
10+ from users.models import Token, User;
11+
12+ username = 'admin';
13+ password = '$SUPERUSER_PASSWORD';
14+ email = '$SUPERUSER_EMAIL';
15+
16+ if not User.objects.filter(username='admin'):
17+ User.objects.create_superuser(username, email, password);
18+ print('Superuser created.');
19+ else:
20+ print('Superuser creation skipped. Already exists.');
21+ EOF
22+ fi
Original file line number Diff line number Diff line change 1+ oneshot
Original file line number Diff line number Diff line change 1+ /etc/s6-overlay/s6-rc.d/svc-netbox-prepare/run
You can’t perform that action at this time.
0 commit comments