Explorar o código

Update service start routine in v-start-service and improve logging

Kristan Kenney %!s(int64=6) %!d(string=hai) anos
pai
achega
c13b65df04
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      bin/v-start-service

+ 3 - 3
bin/v-start-service

@@ -28,11 +28,11 @@ check_args '1' "$#" 'SERVICE'
 #----------------------------------------------------------#
 
 if [ "$service" != 'iptables' ]; then
-    service $service start >/dev/null 2>&1
-    check_result $? "$service start failed" $E_RESTART
+    systemctl start $service > /dev/null 2>&1
+    check_result $? "ERROR: $service start failed" $E_RESTART
 else
     $BIN/v-update-firewall
-    check_result $? "$service start failed" $E_RESTART
+    check_result $? "ERROR: $service start failed" $E_RESTART
 fi