Browse Source

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

Kristan Kenney 6 years ago
parent
commit
c13b65df04
1 changed files with 3 additions and 3 deletions
  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
 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
 else
     $BIN/v-update-firewall
     $BIN/v-update-firewall
-    check_result $? "$service start failed" $E_RESTART
+    check_result $? "ERROR: $service start failed" $E_RESTART
 fi
 fi