mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
firewall service handler
This commit is contained in:
parent
14230b2316
commit
cb72d66886
4 changed files with 102 additions and 9 deletions
|
@ -27,9 +27,16 @@ check_args '1' "$#" 'SERVICE'
|
|||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
service $service stop >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $E_RESTART
|
||||
if [ "$service" != 'iptables' ]; then
|
||||
service $service stop >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $E_RESTART
|
||||
fi
|
||||
else
|
||||
$BIN/v-stop-firewall
|
||||
if [ $? -ne 0 ]; then
|
||||
exit $E_RESTART
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue