1 Commits
1.0.2 ... 1.0.3

Author SHA1 Message Date
5f09b5fd2c added post-installation directives 2022-09-24 12:28:39 +02:00

14
post-installation.sh Executable file
View File

@@ -0,0 +1,14 @@
#/usr/bin/env bash
set -e
# Search or ask for .env file
ENV_FILE=".env"
while [ ! -f "${ENV_FILE}" ]; do
read -p "\"${ENV_FILE}\" file does not exist, please type your env file: " ENV_FILE
done
# Disable superuser config in environment variable, it's now in the database
sed -i "s/NETBOX_SUPERUSER_EMAIL=.*/NETBOX_SUPERUSER_EMAIL=/" "${ENV_FILE}"
sed -i "s/NETBOX_SUPERUSER_NAME=.*/NETBOX_SUPERUSER_NAME=/" "${ENV_FILE}"
sed -i "s/NETBOX_SUPERUSER_PASS=.*/NETBOX_SUPERUSER_PASS=/" "${ENV_FILE}"
sed -i "s/NETBOX_SKIP_SUPERUSER=/NETBOX_SKIP_SUPERUSER=true/" "${ENV_FILE}"