From 77f5fca521f0e058247301405f6741d663574663 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Mon, 24 Apr 2023 14:04:12 -0700 Subject: [PATCH] add fpmmax --- bin/vhost-user-get.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/vhost-user-get.sh b/bin/vhost-user-get.sh index e51d51f..37f98b0 100755 --- a/bin/vhost-user-get.sh +++ b/bin/vhost-user-get.sh @@ -37,7 +37,7 @@ else usernames=(`ls /home/`) fi -output="username uid jailed passwd" +output="username uid jailed passwd fpmmax" for username in "${usernames[@]}" do @@ -49,7 +49,7 @@ do password=`echo "$password" | openssl aes-256-cbc -d -a -pass pass:$opensslpass -pbkdf2` fi else - password= + password="(unknown)" fi shell=(`grep $username /etc/passwd|awk -F : '{ print $6 }'`) if [[ $shell = "/usr/jails/$username/./home/$username" ]]; then @@ -57,7 +57,13 @@ do else jailed="No" fi - output="$output${NL}$username $userid $jailed $password" + vhost::set-phpVersion + if [[ -f /etc/php/$phpVersion/fpm/pool.d/$username.conf ]]; then + fpmmax=(`grep pm.max_children /etc/php/$phpVersion/fpm/pool.d/$username.conf |awk -F = '{ gsub(/ /,""); print $2 }'`); + else + fpmmax=0 + fi + output="$output${NL}$username $userid $jailed $password $fpmmax" done if [[ $cvs ]]; then