Update install.sh

This commit is contained in:
Oliver Gwyther 2024-04-16 16:04:24 +01:00
parent e1858b60a8
commit fc89d1d713

View File

@ -21,8 +21,8 @@ python3 --version
# Prompt user to confirm if the currently installed Python version meets the minimum requirements # Prompt user to confirm if the currently installed Python version meets the minimum requirements
read -p "Does the installed Python version meet the minimum requirements of Python 3.8, 3.9, 3.10 or 3.11.? (y/n): " PYTHON_CONFIRM read -p "Does the installed Python version meet the minimum requirements of Python 3.8, 3.9, 3.10 or 3.11.? (y/n): " PYTHON_CONFIRM
if [[ $PYTHON_CONFIRM != "y" ]]; then if [[ $PYTHON_CONFIRM != "y" ]]; then
echo "Please install the required version of Python and rerun this script." echo "Minimum Python version requirement confirmed!"
exit 1 exit 0
fi fi
# Check other system requirements # Check other system requirements
@ -153,6 +153,10 @@ if [ -n "$PLUGIN_NAMES" ]; then
done done
fi fi
# Prompt user to create a new superuser
echo "Please create a new superuser for Netbox:"
sudo -u netbox /opt/netbox/manage.py createsuperuser
# Set file and directory permissions # Set file and directory permissions
echo "Setting file permissions..." echo "Setting file permissions..."
chown -R netbox:netbox /opt/netbox/netbox/media chown -R netbox:netbox /opt/netbox/netbox/media