dynamic name for php-fpm init script

This commit is contained in:
Serghey Rodin 2016-11-23 18:30:30 +02:00
parent b54b96228a
commit df019a8e99

View file

@ -88,16 +88,17 @@ done
# Restarting service
if [ "$update" = 'yes' ] && [ "$restart" != 'no' ]; then
if [[ "$service" =~ - ]]; then
service=$(echo ${service%-*})
fi
if [ "$service" = 'php' ]; then
if [ "$WEB_SYSTEM" = "nginx" ]; then
service=$WEB_BACKEND
service=$(ls /usr/sbin/php*fpm* |cut -f 4 -d /)
else
service=$WEB_SYSTEM
fi
fi
if [[ "$service" =~ - ]]; then
service=$(echo ${service%-*})
fi
service $service restart >/dev/null 2>&1
if [ $? -ne 0 ]; then