Merge branch 'master' into patch-1
This commit is contained in:
commit
fcf01432ed
|
@ -15,6 +15,9 @@ AUTH_LDAP_CONNECTION_OPTIONS = {
|
||||||
AUTH_LDAP_BIND_DN = os.environ.get('AUTH_LDAP_BIND_DN', '')
|
AUTH_LDAP_BIND_DN = os.environ.get('AUTH_LDAP_BIND_DN', '')
|
||||||
AUTH_LDAP_BIND_PASSWORD = os.environ.get('AUTH_LDAP_BIND_PASSWORD', '')
|
AUTH_LDAP_BIND_PASSWORD = os.environ.get('AUTH_LDAP_BIND_PASSWORD', '')
|
||||||
|
|
||||||
|
# Set a string template that describes any user’s distinguished name based on the username.
|
||||||
|
AUTH_LDAP_USER_DN_TEMPLATE = os.environ.get('AUTH_LDAP_USER_DN_TEMPLATE', None)
|
||||||
|
|
||||||
# Include this setting if you want to ignore certificate errors. This might be needed to accept a self-signed cert.
|
# Include this setting if you want to ignore certificate errors. This might be needed to accept a self-signed cert.
|
||||||
# Note that this is a NetBox-specific setting which sets:
|
# Note that this is a NetBox-specific setting which sets:
|
||||||
# ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
|
# ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
|
||||||
|
|
|
@ -31,7 +31,7 @@ fi
|
||||||
|
|
||||||
echo "💡 Username: ${SUPERUSER_NAME}, E-Mail: ${SUPERUSER_EMAIL}"
|
echo "💡 Username: ${SUPERUSER_NAME}, E-Mail: ${SUPERUSER_EMAIL}"
|
||||||
|
|
||||||
./manage.py shell --plain << END
|
./manage.py shell --interface python << END
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from users.models import Token
|
from users.models import Token
|
||||||
if not User.objects.filter(username='${SUPERUSER_NAME}'):
|
if not User.objects.filter(username='${SUPERUSER_NAME}'):
|
||||||
|
@ -41,7 +41,7 @@ END
|
||||||
|
|
||||||
for script in /opt/netbox/startup_scripts/*.py; do
|
for script in /opt/netbox/startup_scripts/*.py; do
|
||||||
echo "⚙️ Executing '$script'"
|
echo "⚙️ Executing '$script'"
|
||||||
./manage.py shell --plain < "${script}"
|
./manage.py shell --interface python < "${script}"
|
||||||
done
|
done
|
||||||
|
|
||||||
# copy static files
|
# copy static files
|
||||||
|
|
Loading…
Reference in New Issue