Serghey Rodin 12 лет назад
Родитель
Сommit
5981afc795
6 измененных файлов с 18 добавлено и 48 удалено
  1. 3 8
      bin/v-restart-cron
  2. 3 8
      bin/v-restart-dns
  3. 3 8
      bin/v-restart-ftp
  4. 3 8
      bin/v-restart-mail
  5. 3 8
      bin/v-restart-proxy
  6. 3 8
      bin/v-restart-web

+ 3 - 8
bin/v-restart-cron

@@ -19,14 +19,9 @@ source $VESTA/func/main.sh
 #----------------------------------------------------------#
 
 if [ ! -z "$CRON_SYSTEM" ]; then
-    /etc/init.d/$CRON_SYSTEM status >/dev/null 2>&1
-    if [ $? -eq 0 ]; then
-        /etc/init.d/$CRON_SYSTEM reload >/dev/null 2>&1
-        if [ $? -ne 0 ]; then
-            exit $E_RESTART
-        fi
-    else
-        /etc/init.d/$CRON_SYSTEM start >/dev/null 2>&1
+    /etc/init.d/$CRON_SYSTEM reload >/dev/null 2>&1
+    if [ $? -ne 0 ]; then
+        /etc/init.d/$CRON_SYSTEM restart >/dev/null 2>&1
         if [ $? -ne 0 ]; then
             exit $E_RESTART
         fi

+ 3 - 8
bin/v-restart-dns

@@ -19,14 +19,9 @@ source $VESTA/func/main.sh
 #----------------------------------------------------------#
 
 if [ ! -z "$DNS_SYSTEM" ]; then
-    /etc/init.d/$DNS_SYSTEM status >/dev/null 2>&1
-    if [ $? -eq 0 ]; then
-        /etc/init.d/$DNS_SYSTEM reload >/dev/null 2>&1
-        if [ $? -ne 0 ]; then
-            exit $E_RESTART
-        fi
-    else
-        /etc/init.d/$DNS_SYSTEM start >/dev/null 2>&1
+    /etc/init.d/$DNS_SYSTEM reload >/dev/null 2>&1
+    if [ $? -ne 0 ]; then
+        /etc/init.d/$DNS_SYSTEM restart >/dev/null 2>&1
         if [ $? -ne 0 ]; then
             exit $E_RESTART
         fi

+ 3 - 8
bin/v-restart-ftp

@@ -19,14 +19,9 @@ source $VESTA/func/main.sh
 #----------------------------------------------------------#
 
 if [ ! -z "$FTP_SYSTEM" ]; then
-    /etc/init.d/$FTP_SYSTEM status >/dev/null 2>&1
-    if [ $? -eq 0 ]; then
-        /etc/init.d/$FTP_SYSTEM reload >/dev/null 2>&1
-        if [ $? -ne 0 ]; then
-            exit $E_RESTART
-        fi
-    else
-        /etc/init.d/$FTP_SYSTEM start >/dev/null 2>&1
+    /etc/init.d/$FTP_SYSTEM reload >/dev/null 2>&1
+    if [ $? -ne 0 ]; then
+        /etc/init.d/$FTP_SYSTEM restart >/dev/null 2>&1
         if [ $? -ne 0 ]; then
             exit $E_RESTART
         fi

+ 3 - 8
bin/v-restart-mail

@@ -19,14 +19,9 @@ source $VESTA/func/main.sh
 #----------------------------------------------------------#
 
 if [ ! -z "$MAIL_SYSTEM" ]; then
-    /etc/init.d/$MAIL_SYSTEM status >/dev/null 2>&1
-    if [ $? -eq 0 ]; then
-        /etc/init.d/$MAIL_SYSTEM reload >/dev/null 2>&1
-        if [ $? -ne 0 ]; then
-            exit $E_RESTART
-        fi
-    else
-        /etc/init.d/$MAIL_SYSTEM start >/dev/null 2>&1
+    /etc/init.d/$MAIL_SYSTEM reload >/dev/null 2>&1
+    if [ $? -ne 0 ]; then
+        /etc/init.d/$MAIL_SYSTEM restart >/dev/null 2>&1
         if [ $? -ne 0 ]; then
             exit $E_RESTART
         fi

+ 3 - 8
bin/v-restart-proxy

@@ -19,14 +19,9 @@ source $VESTA/func/main.sh
 #----------------------------------------------------------#
 
 if [ ! -z "$PROXY_SYSTEM" ]; then
-    /etc/init.d/$PROXY_SYSTEM status >/dev/null 2>&1
-    if [ $? -eq 0 ]; then
-        /etc/init.d/$PROXY_SYSTEM reload >/dev/null 2>&1
-        if [ $? -ne 0 ]; then
-            exit $E_RESTART
-        fi
-    else
-        /etc/init.d/$PROXY_SYSTEM start >/dev/null 2>&1
+    /etc/init.d/$PROXY_SYSTEM reload >/dev/null 2>&1
+    if [ $? -ne 0 ]; then
+        /etc/init.d/$PROXY_SYSTEM restart >/dev/null 2>&1
         if [ $? -ne 0 ]; then
             exit $E_RESTART
         fi

+ 3 - 8
bin/v-restart-web

@@ -19,14 +19,9 @@ source $VESTA/func/main.sh
 #----------------------------------------------------------#
 
 if [ ! -z "$WEB_SYSTEM" ]; then
-    /etc/init.d/$WEB_SYSTEM status >/dev/null 2>&1
-    if [ $? -eq 0 ]; then
-        /etc/init.d/$WEB_SYSTEM reload >/dev/null 2>&1
-        if [ $? -ne 0 ]; then
-            exit $E_RESTART
-        fi
-    else
-        /etc/init.d/$WEB_SYSTEM start >/dev/null 2>&1
+    /etc/init.d/$WEB_SYSTEM reload >/dev/null 2>&1
+    if [ $? -ne 0 ]; then
+        /etc/init.d/$WEB_SYSTEM restart >/dev/null 2>&1
         if [ $? -ne 0 ]; then
             exit $E_RESTART
         fi