mirror of
https://github.com/kejilion/sh.git
synced 2025-10-03 23:34:20 +08:00
Update kejilion.sh
This commit is contained in:
parent
dbfd124f66
commit
c932dd00f8
1 changed files with 2 additions and 3 deletions
|
@ -6677,12 +6677,11 @@ fi
|
|||
|
||||
fix_phpfpm_conf() {
|
||||
local container_name=$1
|
||||
|
||||
echo "正在修复容器: $container_name"
|
||||
docker exec "$container_name" sh -c "mkdir -p /run/$container_name && chmod 777 /run/$container_name"
|
||||
docker exec "$container_name" sh -c "sed -i '1i [global]\\ndaemonize = no' /usr/local/etc/php-fpm.d/www.conf"
|
||||
docker exec "$container_name" sh -c "sed -i '/^listen =/d' /usr/local/etc/php-fpm.d/www.conf"
|
||||
docker exec "$container_name" sh -c "echo -e '\nlisten = /run/$container_name/php-fpm.sock\nlisten.owner = www-data\nlisten.group = www-data\nlisten.mode = 0777' >> /usr/local/etc/php-fpm.d/www.conf"
|
||||
docker exec "$container_name" sh -c "sed -i '/^daemonize = no/,\$d' /usr/local/etc/php-fpm.d/zz-docker.conf"
|
||||
docker exec "$container_name" sh -c "rm -f /usr/local/etc/php-fpm.d/zz-docker.conf"
|
||||
|
||||
find /home/web/conf.d/ -type f -name "*.conf" -exec sed -i "s#fastcgi_pass ${container_name}:9000;#fastcgi_pass unix:/run/${container_name}/php-fpm.sock;#g" {} \;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue