mirror of
https://github.com/crivion/laranode.git
synced 2026-06-01 11:30:41 +08:00
finally can reboot php-fpm without disrupting current request
This commit is contained in:
@@ -31,9 +31,6 @@ PID_FILE="/var/run/php/php${PHP_VERSION}-fpm.pid"
|
||||
|
||||
# reload php{version}-fpm
|
||||
echo "Reloading php$PHP_VERSION-fpm..."
|
||||
#systemctl restart "php${version}-fpm"
|
||||
|
||||
# restart in bg to avoid current request issues in the browser
|
||||
nohup systemctl restart "php${PHP_VERSION}-fpm" >/dev/null 2>&1 &
|
||||
|
||||
#kill -USR2 $(cat "$PID_FILE")
|
||||
(sleep 2 && systemctl reload "php${PHP_VERSION}-fpm") >/dev/null 2>&1 &
|
||||
|
||||
@@ -23,8 +23,5 @@ fi
|
||||
# reload php{version}-fpm
|
||||
echo "Reloading php$PHP_VERSION-fpm..."
|
||||
|
||||
# Get the PID of PHP-FPM based on PHP version
|
||||
PID_FILE="/var/run/php/php${PHP_VERSION}-fpm.pid"
|
||||
#systemctl reload php"$PHP_VERSION"-fpm
|
||||
(sleep 2 && systemctl restart "php${PHP_VERSION}-fpm") >/dev/null 2>&1 &
|
||||
|
||||
kill -USR2 $(cat "$PID_FILE")
|
||||
|
||||
Reference in New Issue
Block a user