dynamic name for php-fpm service

This commit is contained in:
Serghey Rodin 2016-11-28 15:45:45 +02:00
commit 76d518bf86
2 changed files with 7 additions and 1 deletions

View file

@ -50,7 +50,13 @@ if [ -z "$WEB_BACKEND" ] || [ "$WEB_BACKEND" = 'remote' ]; then
fi fi
# Restart system # Restart system
php_fpm=$(ls /etc/init.d/php*-fpm* 2>/dev/null |cut -f 4 -d /)
if [ -z "$php_fpm" ]; then
service $WEB_BACKEND restart >/dev/null 2>&1 service $WEB_BACKEND restart >/dev/null 2>&1
else
service $php_fpm restart >/dev/null 2>&1
fi
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
send_email_report send_email_report
check_result $E_RESTART "$WEB_BACKEND restart failed" check_result $E_RESTART "$WEB_BACKEND restart failed"

0
bin/v-update-web-domain-ssl Normal file → Executable file
View file