check_result function

This commit is contained in:
Serghey Rodin 2015-10-28 16:34:41 +02:00
commit 91a804c1c8
66 changed files with 204 additions and 404 deletions

View file

@ -29,14 +29,10 @@ check_args '1' "$#" 'SERVICE'
if [ "$service" != 'iptables' ]; then
service $service stop >/dev/null 2>&1
if [ $? -ne 0 ]; then
exit $E_RESTART
fi
check_result $? "$service stop failed" $E_RESTART
else
$BIN/v-stop-firewall
if [ $? -ne 0 ]; then
exit $E_RESTART
fi
check_result $? "$service stop failed" $E_RESTART
fi