Skip to content

Commit df019a8

Browse files
author
Serghey Rodin
committed
dynamic name for php-fpm init script
1 parent b54b962 commit df019a8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

bin/v-change-sys-service-config

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,17 @@ done
8888

8989
# Restarting service
9090
if [ "$update" = 'yes' ] && [ "$restart" != 'no' ]; then
91+
if [[ "$service" =~ - ]]; then
92+
service=$(echo ${service%-*})
93+
fi
94+
9195
if [ "$service" = 'php' ]; then
9296
if [ "$WEB_SYSTEM" = "nginx" ]; then
93-
service=$WEB_BACKEND
97+
service=$(ls /usr/sbin/php*fpm* |cut -f 4 -d /)
9498
else
9599
service=$WEB_SYSTEM
96100
fi
97101
fi
98-
if [[ "$service" =~ - ]]; then
99-
service=$(echo ${service%-*})
100-
fi
101102

102103
service $service restart >/dev/null 2>&1
103104
if [ $? -ne 0 ]; then

0 commit comments

Comments
 (0)