mirror of
https://github.com/rvalitov/zabbix-php-fpm.git
synced 2023-11-05 03:30:27 +01:00
[fix] stop PHP-FPM before modifications
This commit is contained in:
parent
6f0bea84df
commit
d53e9293b7
11
tests/all.sh
11
tests/all.sh
@ -111,6 +111,17 @@ setupPool() {
|
|||||||
|
|
||||||
setupPools() {
|
setupPools() {
|
||||||
PHP_LIST=$(sudo find /etc/php/ -name 'www.conf' -type f)
|
PHP_LIST=$(sudo find /etc/php/ -name 'www.conf' -type f)
|
||||||
|
|
||||||
|
#First we need to stop all PHP-FPM
|
||||||
|
while IFS= read -r pool; do
|
||||||
|
if [[ -n $pool ]]; then
|
||||||
|
POOL_DIR=$(dirname "$pool")
|
||||||
|
PHP_VERSION=$(echo "$POOL_DIR" | grep -oP "(\d\.\d)")
|
||||||
|
sudo service "php${PHP_VERSION}-fpm" stop
|
||||||
|
fi
|
||||||
|
done <<<"$PHP_LIST"
|
||||||
|
|
||||||
|
#Now we reconfigure them and restart
|
||||||
while IFS= read -r pool; do
|
while IFS= read -r pool; do
|
||||||
if [[ -n $pool ]]; then
|
if [[ -n $pool ]]; then
|
||||||
setupPool "$pool"
|
setupPool "$pool"
|
||||||
|
Loading…
Reference in New Issue
Block a user