Had to fix typo with getenforce (was genenforce), and fix some comments

This commit is contained in:
Tristan Ancelet 2023-11-13 20:14:13 -06:00
parent 708d599cce
commit 3102d34556

View File

@ -3,7 +3,7 @@
: "
install-librenms.sh
This is just a script I created to handle automating the installation of LibreNMS on a CentOS8 (any rhel v8 base distro will work) host
This is just a script I created to handle automating the installation of LibreNMS on a Rocky 8 machine (any distro will do)
I will update it after getting my own instance setup in my lab, as my coworkers are wanting to use this for work. Will design it to actually handle settings already being set (so it will skip the un-necessary steps)
@ -20,7 +20,7 @@ FQDN=librenms.example.com
LIBRENMS_ROOT=/opt/librenms
SNMP_COMMUNITY=lab
## Config Files that need to be interacte with throughout the script
## Config Files that need to be interacted with throughout the script
SELINUX_CONFIG=/etc/selinux/config
PHP_ini=/etc/php.ini
MARIADB_CONF=/etc/my.cnf.d/mariadb-server.cnf
@ -76,7 +76,7 @@ TIMEZONE_CLEANED="${TIMEZONE/\//\\/}"
### Make backup
cp $PHP_ini{,.bak}
sed -i s"/\#date.timezone=/date.timezone=$TIMEZONE_CLEANED/" $PHP_ini
sed -i s"/\;date.timezone=/date.timezone=$TIMEZONE_CLEANED/" $PHP_ini
### Configure timezone with system
timedatectl set-timezone $TIMEZONE
@ -159,7 +159,7 @@ if [[ "${SELINUX_STATE,,}" =~ ^enforcing|permissive$ ]]; then
fi
## If the running selinux is still set to enforcing, set it to permissive (will be diabled next boot)
if [[ `genenforce` == 'Enforcing' ]]; then
if [[ `getenforce` == 'Enforcing' ]]; then
setenforce 0
fi