Fixed typo's in config

This commit is contained in:
2021-01-08 17:52:30 +01:00
parent ff9b4229c5
commit 7c719140fe
4 changed files with 13 additions and 9 deletions

13
conf.sh
View File

@@ -1,7 +1,10 @@
mrepo=https://git.ictmaatwerk.com/VPS-scripts/Monit
mbranch=main
mkdir /var/run/monit
mkdir /var/run/monit
chmod 0755 /var/run/monit
chown www-data:root /var/run/monit
echo "D /var/run/monit 0755 www-data root -" > /usr/lib/tmpfiles.d/monitSock.conf
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then
monitconf=/etc/monit/monitrc
@@ -23,20 +26,20 @@ elif [ "$shortdist" = "el8" ]; then
monitPhpPid=/var/opt/remi/php"${phpver//.}"/run/php-fpm/php-fpm.pid
monitPhpPro=php-fpm
semanage fcontext -at httpd_sys_rw_content_t "/var/run/monit/.*)?"
semanage fcontext -at httpd_sys_rw_content_t "/var/run/monit/(.*)?"
restorecon -R -v "/var/run/monit"
fi
systemctl stop monit
if [ ! -d "/var/lib/monit" ] ; then mkdir -p /var/lib/monit; fi
mkdir -p /etc/monit/conf.d
curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/conf/monit/monitrc -o $monitconf
curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/conf/monit/monitwebsocket -o /etc/monit/websocket
touch /opt/MonitNotify.sh
chmod +x /opt/MonitNotify.sh
if [ ! -d "/var/lib/monit" ] ; then mkdir -p /var/lib/monit; fi
mkdir -p /etc/monit/conf.d
SysServiceList=$(systemctl list-units --full -all)