Limit 1 line for service name

This commit is contained in:
Denis Efremov 2017-02-15 07:29:55 +03:00 committed by GitHub
commit f2872dd61e

View file

@ -95,7 +95,7 @@ if [ "$update" = 'yes' ] && [ "$restart" != 'no' ]; then
if [ "$service" = 'php' ]; then
if [ "$WEB_SYSTEM" = "nginx" ]; then
service=$(ls /etc/init.d/php*fpm* |cut -f 4 -d /)
service=$(ls /etc/init.d/php*fpm* |cut -f 4 -d / |sed -n 1p)
else
service=$WEB_SYSTEM
fi