Pārlūkot izejas kodu

dynamic name for php-fpm service

Serghey Rodin 9 gadi atpakaļ
vecāks
revīzija
76d518bf86
2 mainītis faili ar 7 papildinājumiem un 1 dzēšanām
  1. 7 1
      bin/v-restart-web-backend
  2. 0 0
      bin/v-update-web-domain-ssl

+ 7 - 1
bin/v-restart-web-backend

@@ -50,7 +50,13 @@ if [ -z "$WEB_BACKEND" ] || [ "$WEB_BACKEND" = 'remote' ]; then
 fi
 
 # Restart system
-service $WEB_BACKEND restart >/dev/null 2>&1
+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
+else
+    service $php_fpm restart >/dev/null 2>&1
+fi
+
 if [ $? -ne 0 ]; then
     send_email_report
     check_result $E_RESTART "$WEB_BACKEND restart failed"

+ 0 - 0
bin/v-update-web-domain-ssl