Skip to content

Commit f2872dd

Browse files
authored
Limit 1 line for service name
1 parent 48101b1 commit f2872dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/v-change-sys-service-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ if [ "$update" = 'yes' ] && [ "$restart" != 'no' ]; then
9595

9696
if [ "$service" = 'php' ]; then
9797
if [ "$WEB_SYSTEM" = "nginx" ]; then
98-
service=$(ls /etc/init.d/php*fpm* |cut -f 4 -d /)
98+
service=$(ls /etc/init.d/php*fpm* |cut -f 4 -d / |sed -n 1p)
9999
else
100100
service=$WEB_SYSTEM
101101
fi

0 commit comments

Comments
 (0)