updated systemctl path, fixed mysql & php conf

This commit is contained in:
2021-01-08 15:03:15 +01:00
parent cedf566f74
commit fc90bb59fe
7 changed files with 20 additions and 19 deletions

11
conf.sh
View File

@@ -33,7 +33,7 @@ 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
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
@@ -58,7 +58,7 @@ fi
if echo "$SysServiceList" | grep -Fq "$monitMysqlserv"; then
curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/conf/monit/mysql.conf -o /etc/monit/conf.d/mysql.conf
sed -i "s/MYSQLserv/$monitMysqlservice/g" /etc/monit/conf.d/mysql.conf
sed -i "s/MYSQLserv/$monitMysqlserv/g" /etc/monit/conf.d/mysql.conf
fi
if echo "$SysServiceList" | grep -Fq 'nginx'; then
@@ -67,10 +67,11 @@ fi
if echo "$SysServiceList" | grep -Fq "$phpFPMService" && test ! -z "$phpFPMService"; then
curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/conf/monit/php-fpm.conf -o /etc/monit/conf.d/php"$phpver".conf
sed -i "s/PHPpid/$monitPhpPid/g" /etc/monit/conf.d/php"$phpver".conf
sed -i "s/PHPpro/$monitPhpPro/g" /etc/monit/conf.d/php"$phpver".conf
sed -i "s#PHPpid#$monitPhpPid#g" /etc/monit/conf.d/php"$phpver".conf
sed -i "s#PHPpro#$monitPhpPro#g" /etc/monit/conf.d/php"$phpver".conf
sed -i "s#PHPsock#$monitPhpSock#g" /etc/monit/conf.d/php"$phpver".conf
sed -i "s/PHPsrv/$phpFPMService/g" /etc/monit/conf.d/php"$phpver".conf
sed -i "s/PHPsock/$monitPhpSock/g" /etc/monit/conf.d/php"$phpver".conf
sed -i "s/PHPver/$phpver/g" /etc/monit/conf.d/php"$phpver".conf
fi
if echo "$SysServiceList" | grep -Fq "$apacheService" && test ! -z "$apacheService"; then