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