mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 03:59:16 +01:00
Add support for a "status" command to the Debian init scripts
(cherry picked from commit d36a2030ea
)
This commit is contained in:
parent
0a605c63f2
commit
cf8c30904d
@ -109,6 +109,11 @@ shorewall_refresh () {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# status of the firewall
|
||||||
|
shorewall_status () {
|
||||||
|
$SRWL $SRWL_OPTS status && exit 0 || exit $?
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
shorewall_start
|
shorewall_start
|
||||||
@ -122,8 +127,11 @@ case "$1" in
|
|||||||
force-reload|restart)
|
force-reload|restart)
|
||||||
shorewall_restart
|
shorewall_restart
|
||||||
;;
|
;;
|
||||||
|
status)
|
||||||
|
shorewall_status
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/shorewall-lite {start|stop|refresh|restart|force-reload}"
|
echo "Usage: /etc/init.d/shorewall-lite {start|stop|refresh|restart|force-reload|status}"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -115,6 +115,11 @@ shorewall_refresh () {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# status of the firewall
|
||||||
|
shorewall_status () {
|
||||||
|
$SRWL $SRWL_OPTS status && exit 0 || exit $?
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
shorewall_start
|
shorewall_start
|
||||||
@ -128,8 +133,11 @@ case "$1" in
|
|||||||
force-reload|restart)
|
force-reload|restart)
|
||||||
shorewall_restart
|
shorewall_restart
|
||||||
;;
|
;;
|
||||||
|
status)
|
||||||
|
shorewall_status
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/shorewall {start|stop|refresh|restart|force-reload}"
|
echo "Usage: /etc/init.d/shorewall {start|stop|refresh|restart|force-reload|status}"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -110,6 +110,11 @@ shorewall6_refresh () {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# status of the firewall
|
||||||
|
shorewall6_status () {
|
||||||
|
$SRWL $SRWL_OPTS status && exit 0 || exit $?
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
shorewall6_start
|
shorewall6_start
|
||||||
@ -123,8 +128,11 @@ case "$1" in
|
|||||||
force-reload|restart)
|
force-reload|restart)
|
||||||
shorewall6_restart
|
shorewall6_restart
|
||||||
;;
|
;;
|
||||||
|
status)
|
||||||
|
shorewall6_status
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/shorewall6-lite {start|stop|refresh|restart|force-reload}"
|
echo "Usage: /etc/init.d/shorewall6-lite {start|stop|refresh|restart|force-reload|status}"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -115,6 +115,11 @@ shorewall6_refresh () {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# status of the firewall
|
||||||
|
shorewall6_status () {
|
||||||
|
$SRWL $SRWL_OPTS status && exit 0 || exit $?
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
shorewall6_start
|
shorewall6_start
|
||||||
@ -128,8 +133,11 @@ case "$1" in
|
|||||||
force-reload|restart)
|
force-reload|restart)
|
||||||
shorewall6_restart
|
shorewall6_restart
|
||||||
;;
|
;;
|
||||||
|
status)
|
||||||
|
shorewall6_status
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/shorewall6 {start|stop|refresh|restart|force-reload}"
|
echo "Usage: /etc/init.d/shorewall6 {start|stop|refresh|restart|force-reload|status}"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user