mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 03:16:25 -06:00
Always run *some* startup scripts even when disabled
This commit is contained in:
parent
0fe0267c72
commit
fff05b3154
@ -39,15 +39,18 @@ if not User.objects.filter(username='${SUPERUSER_NAME}'):
|
||||
Token.objects.create(user=u, key='${SUPERUSER_API_TOKEN}')
|
||||
END
|
||||
|
||||
startup_scripts=/opt/netbox/startup_scripts/*.py
|
||||
|
||||
if [ "$SKIP_STARTUP_SCRIPTS" == "true" ]; then
|
||||
echo "☇ Skipping startup scripts"
|
||||
else
|
||||
for script in /opt/netbox/startup_scripts/*.py; do
|
||||
echo "⚙️ Executing '$script'"
|
||||
./manage.py shell --interface python < "${script}"
|
||||
done
|
||||
startup_scripts=/opt/netbox/startup_scripts/*required*.py
|
||||
fi
|
||||
|
||||
for script in $startup_scripts; do
|
||||
echo "⚙️ Executing '$script'"
|
||||
./manage.py shell --interface python < "${script}"
|
||||
done
|
||||
|
||||
# copy static files
|
||||
./manage.py collectstatic --no-input
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user