Last active 1747088762

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

KarelWintersky revised this gist 1747088762. Go to revision

1 file changed, 4 insertions

restart_php.sh(file created)

@@ -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
Newer Older