最后活跃于 1747088762

Рестарт всех PHP-FPM процессов в системе

KarelWintersky 修订了这个 Gist 1747088762. 转到此修订

1 file changed, 4 insertions

restart_php.sh(文件已创建)

@@ -0,0 +1,4 @@
1 + #!/bin/bash
2 +
3 + PHP_VERSIONS=$(ps -e -o stat,command | grep -E '^Ss\s+php-fpm' | grep -E '[0-9]+\.[0-9]+' -o)
4 + for version in $PHP_VERSIONS; do echo "Restarting ${ANSI_YELLOW}php${version}-fpm${ANSI_RESET} process..."; systemctl restart php${version}-fpm; done
上一页 下一页