From bdd85730b5d15cfb36903fad48012d0c879e7dfc Mon Sep 17 00:00:00 2001 From: Oliver Gwyther Date: Mon, 15 Apr 2024 22:27:51 +0100 Subject: [PATCH] Remove requirements for user to input REDIS config manually. --- netbox/install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/netbox/install.sh b/netbox/install.sh index 968ad1f..d04e029 100644 --- a/netbox/install.sh +++ b/netbox/install.sh @@ -64,13 +64,11 @@ sed -i "s/'HOST': '',/'HOST': 'localhost',/g" configuration.py # Prompt user to enter ALLOWED_HOSTS, REDIS, and SECRET_KEY echo "Please enter manually input the following inforation..." read -p "Enter ALLOWED_HOSTS (separated by commas): " ALLOWED_HOSTS -read -p "Enter REDIS server (usually 'localhost'): " REDIS read -p "Enter SECRET_KEY: " SECRET_KEY # Parse user input into configuration.py echo "Parsing the entered information to configuration.py..." sed -i "s/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = \[$ALLOWED_HOSTS\]/g" configuration.py -sed -i "s/REDIS = {}/REDIS = {'HOST': '$REDIS', 'PORT': 6379, 'PASSWORD': '', 'DATABASE': 0}/g" configuration.py sed -i "s/SECRET_KEY = ''/SECRET_KEY = '$SECRET_KEY'/g" configuration.py # Perform initial database migration