added webui
This commit is contained in:
9
conf.sh
9
conf.sh
@@ -1,6 +1,8 @@
|
||||
mrepo=https://git.ictmaatwerk.com/VPS-scripts/Monit
|
||||
mbranch=main
|
||||
|
||||
mkdir /var/run/monit
|
||||
|
||||
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then
|
||||
monitconf=/etc/monit/monitrc
|
||||
|
||||
@@ -22,11 +24,18 @@ elif [ "$shortdist" = "el8" ]; then
|
||||
monitPhpSock=/var/opt/remi/php"${phpver//.}"/run/php-fpm/www.sock
|
||||
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/.*)?"
|
||||
restorecon -R -v "/var/run/monit"
|
||||
fi
|
||||
|
||||
systemctl stop monit
|
||||
|
||||
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 /conf/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
|
||||
|
||||
Reference in New Issue
Block a user