rearrange output, set php version only once
This commit is contained in:
parent
77f5fca521
commit
6850a5b6e2
|
@ -21,6 +21,7 @@ help()
|
|||
}
|
||||
|
||||
vhost:getoptions "$@"
|
||||
vhost::set-phpVersion
|
||||
|
||||
# create newline var
|
||||
NL=$'\n'
|
||||
|
@ -37,7 +38,7 @@ else
|
|||
usernames=(`ls /home/`)
|
||||
fi
|
||||
|
||||
output="username uid jailed passwd fpmmax"
|
||||
output="uid username passwd jailed fpmmax"
|
||||
|
||||
for username in "${usernames[@]}"
|
||||
do
|
||||
|
@ -57,13 +58,12 @@ do
|
|||
else
|
||||
jailed="No"
|
||||
fi
|
||||
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"
|
||||
output="$output${NL}$userid $username $password $jailed $fpmmax"
|
||||
done
|
||||
|
||||
if [[ $cvs ]]; then
|
||||
|
|
Loading…
Reference in New Issue
Block a user