Skip to content

Commit 16fbfe7

Browse files
author
Kristan Kenney
committed
Update service stop routine in v-stop-service and improve logging
1 parent c13b65d commit 16fbfe7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/v-stop-service

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ check_args '1' "$#" 'SERVICE'
2828
#----------------------------------------------------------#
2929

3030
if [ "$service" != 'iptables' ]; then
31-
service $service stop >/dev/null 2>&1
32-
check_result $? "$service stop failed" $E_RESTART
31+
systemctl stop $service >/dev/null 2>&1
32+
check_result $? "ERROR: $service stop failed" $E_RESTART
3333
else
3434
$BIN/v-stop-firewall
35-
check_result $? "$service stop failed" $E_RESTART
35+
check_result $? "ERROR: $service stop failed" $E_RESTART
3636
fi
3737

3838

0 commit comments

Comments
 (0)