File tree Expand file tree Collapse file tree 9 files changed +38
-27
lines changed
root/etc/s6-overlay/s6-rc.d
svc-netbox/dependencies.d Expand file tree Collapse file tree 9 files changed +38
-27
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 @@ -52,33 +52,6 @@ ln -sf /config/ldap_config.py /app/netbox/netbox/netbox/ldap_config.py
5252
5353mv /defaults/uwsgi.ini /app/netbox/netbox/uwsgi.ini > /dev/null 2>&1
5454
55- # build docs
56- if [[ ! -e "/app/netbox/netbox/project-static/docs/index.html" ]]; then
57- cd /app/netbox || exit 1
58- echo "Building local documentation"
59- mkdocs build -q
60- cd /app/netbox/netbox || exit 1
61- fi
62-
6355# permissions
6456lsiown -R abc:abc \
65- /app/netbox/netbox/static \
6657 /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
23+
24+ # build docs
25+ if [[ ! -e "/app/netbox/netbox/project-static/docs/index.html" ]]; then
26+ cd /app/netbox || exit 1
27+ echo "Building local documentation"
28+ mkdocs build -q
29+ cd /app/netbox/netbox || exit 1
30+ fi
31+
32+ # permissions
33+ lsiown -R abc:abc \
34+ /app/netbox/netbox/static
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