Skip to content

Commit 76d518b

Browse files
author
Serghey Rodin
committed
dynamic name for php-fpm service
1 parent 741d447 commit 76d518b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

bin/v-restart-web-backend

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ if [ -z "$WEB_BACKEND" ] || [ "$WEB_BACKEND" = 'remote' ]; then
5050
fi
5151

5252
# Restart system
53-
service $WEB_BACKEND restart >/dev/null 2>&1
53+
php_fpm=$(ls /etc/init.d/php*-fpm* 2>/dev/null |cut -f 4 -d /)
54+
if [ -z "$php_fpm" ]; then
55+
service $WEB_BACKEND restart >/dev/null 2>&1
56+
else
57+
service $php_fpm restart >/dev/null 2>&1
58+
fi
59+
5460
if [ $? -ne 0 ]; then
5561
send_email_report
5662
check_result $E_RESTART "$WEB_BACKEND restart failed"

bin/v-update-web-domain-ssl

100644100755
File mode changed.

0 commit comments

Comments
 (0)