Adjustments, apt key and repo line fixes. Added OpenSearch service parameters.
This commit is contained in:
@ -26,7 +26,7 @@ if [[ $PYTHON_CONFIRM != "y" ]]; then
|
||||
fi
|
||||
|
||||
# Check other system requirements
|
||||
echo "Checking other system requirements..."
|
||||
echo "Checking the system meets the minimum requirements..."
|
||||
RAM=$(free -m | awk '/Mem/ {print $2}')
|
||||
CPU=$(grep -c ^processor /proc/cpuinfo)
|
||||
DISK=$(df -h / | awk 'NR==2 {print $4}')
|
||||
@ -55,7 +55,7 @@ if [ "$DISK_UNIT" == "G" ]; then
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Error: Unsupported disk space unit. Please ensure disk space is in GB."
|
||||
echo "Error: Unsupported disk space unit. Please ensure disk space is at least 10GB."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -137,6 +137,22 @@ fi
|
||||
echo "Collecting static files..."
|
||||
sudo -u netbox /opt/netbox/manage.py collectstatic --no-input
|
||||
|
||||
# Enable plugin support
|
||||
echo "Enabling plugin support..."
|
||||
echo "PLUGINS = []" >> /opt/netbox/netbox/configuration.py
|
||||
|
||||
# Prompt user to enter plugin names
|
||||
read -p "Enter names of plugins to add (separated by commas, leave empty to skip): " PLUGIN_NAMES
|
||||
|
||||
# Add plugins to configuration file
|
||||
if [ -n "$PLUGIN_NAMES" ]; then
|
||||
IFS=',' read -ra PLUGINS <<< "$PLUGIN_NAMES"
|
||||
for PLUGIN in "${PLUGINS[@]}"; do
|
||||
echo "Adding plugin: $PLUGIN"
|
||||
echo " '$PLUGIN'," >> /opt/netbox/netbox/configuration.py
|
||||
done
|
||||
fi
|
||||
|
||||
# Set file and directory permissions
|
||||
echo "Setting file permissions..."
|
||||
chown -R netbox:netbox /opt/netbox/netbox/media
|
||||
|
Reference in New Issue
Block a user