Browse Source

Fix routine in v-restart-service

Kristan Kenney 6 years ago
parent
commit
ca33c8c2d2
1 changed files with 6 additions and 10 deletions
  1. 6 10
      bin/v-restart-service

+ 6 - 10
bin/v-restart-service

@@ -36,18 +36,14 @@ if [ "$service" != "iptables" ] || [ "$service" != "cron" ] || [ "$service" != "
         check_result $E_RESTART "ERROR: Restart of $service failed."
         check_result $E_RESTART "ERROR: Restart of $service failed."
         log_history "Restart of $service failed."
         log_history "Restart of $service failed."
     fi
     fi
-elif [ "$service" = "iptables" ]; then
-    # Restart rules for firewall
-    $BIN/v-stop-firewall
-    $BIN/v-update-firewall
-    if [ $? -ne 0 ]; then
-        check_result $E_RESTART "ERROR: Restart of $service failed."
-        log_history "Restart of $service failed."
+else
+    if [ "$service" = "iptables" ]; then
+        # Restart rules for firewall
+        $BIN/v-stop-firewall
+        $BIN/v-update-firewall
     fi
     fi
-
-if [ "$service" = "cron" ] || [ "$service" = "mysql" ] || [ "$service" = "hestia" ]; then
-    # Restart services not eligible for configuration reload
     systemctl restart $service > /dev/null 2>&1
     systemctl restart $service > /dev/null 2>&1
+
     if [ $? -ne 0 ]; then
     if [ $? -ne 0 ]; then
         check_result $E_RESTART "ERROR: Restart of $service failed."
         check_result $E_RESTART "ERROR: Restart of $service failed."
         log_history "Restart of $service failed."
         log_history "Restart of $service failed."