mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-21 22:01:57 +01:00
Provide STARTOPTIONS and RESTARTOPTIONS in all cases
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
3454e10525
commit
113f95c11e
@ -39,7 +39,7 @@ fi
|
||||
|
||||
start() {
|
||||
echo -n $"Starting Shorewall: "
|
||||
$shorewall $OPTIONS start 2>&1 | $logger
|
||||
$shorewall $OPTIONS start $STARTOPTIONS 2>&1 | $logger
|
||||
retval=${PIPESTATUS[0]}
|
||||
if [[ $retval == 0 ]]; then
|
||||
touch $lockfile
|
||||
@ -69,7 +69,7 @@ restart() {
|
||||
# Note that we don't simply stop and start since shorewall has a built in
|
||||
# restart which stops the firewall if running and then starts it.
|
||||
echo -n $"Restarting Shorewall: "
|
||||
$shorewall $OPTIONS restart 2>&1 | $logger
|
||||
$shorewall $OPTIONS restart $RESTARTOPTIONS 2>&1 | $logger
|
||||
retval=${PIPESTATUS[0]}
|
||||
if [[ $retval == 0 ]]; then
|
||||
touch $lockfile
|
||||
|
@ -13,7 +13,7 @@ Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=-/etc/sysconfig/shorewall-lite
|
||||
StandardOutput=syslog
|
||||
ExecStart=/sbin/shorewall-lite $OPTIONS start
|
||||
ExecStart=/sbin/shorewall-lite $OPTIONS start $STARTOPTIONS
|
||||
ExecStop=/sbin/shorewall-lite $OPTIONS stop
|
||||
|
||||
[Install]
|
||||
|
@ -13,7 +13,7 @@ Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=-/etc/sysconfig/shorewall-lite
|
||||
StandardOutput=syslog
|
||||
ExecStart=/sbin/shorewall-lite $OPTIONS start
|
||||
ExecStart=/sbin/shorewall-lite $OPTIONS start $STARTOPTIONS
|
||||
ExecStop=/sbin/shorewall-lite $OPTIONS stop
|
||||
|
||||
[Install]
|
||||
|
@ -39,7 +39,7 @@ fi
|
||||
|
||||
start() {
|
||||
echo -n $"Starting Shorewall: "
|
||||
$shorewall $OPTIONS start 2>&1 | $logger
|
||||
$shorewall $OPTIONS start $STARTOPTIONS 2>&1 | $logger
|
||||
retval=${PIPESTATUS[0]}
|
||||
if [[ $retval == 0 ]]; then
|
||||
touch $lockfile
|
||||
@ -69,7 +69,7 @@ restart() {
|
||||
# Note that we don't simply stop and start since shorewall has a built in
|
||||
# restart which stops the firewall if running and then starts it.
|
||||
echo -n $"Restarting Shorewall: "
|
||||
$shorewall $OPTIONS restart 2>&1 | $logger
|
||||
$shorewall $OPTIONS restart $RESTARTOPTIONS 2>&1 | $logger
|
||||
retval=${PIPESTATUS[0]}
|
||||
if [[ $retval == 0 ]]; then
|
||||
touch $lockfile
|
||||
|
@ -10,15 +10,16 @@
|
||||
|
||||
OPTIONS=""
|
||||
|
||||
# Use /etc/default shorewall to specify $OPTIONS to run at startup, however this
|
||||
# this might prevent shorewall from starting. use at your own risk
|
||||
# Use /etc/default shorewall to specify $OPTIONS and STARTOPTIONS to
|
||||
# run at startup, however this this might prevent shorewall from
|
||||
# starting. use at your own risk
|
||||
if [ -f /etc/default/shorewall ] ; then
|
||||
. /etc/default/shorewall
|
||||
fi
|
||||
|
||||
start() {
|
||||
echo "Starting IPv4 shorewall rules..."
|
||||
exec /sbin/shorewall $OPTIONS start
|
||||
exec /sbin/shorewall $OPTIONS start $STARTOPTIONS
|
||||
}
|
||||
|
||||
stop() {
|
||||
@ -28,7 +29,7 @@ stop() {
|
||||
|
||||
restart() {
|
||||
echo "Restarting IPv4 shorewall rules..."
|
||||
exec /sbin/shorewall restart
|
||||
exec /sbin/shorewall restart $RESTARTOPTIONS
|
||||
}
|
||||
|
||||
status() {
|
||||
|
@ -13,7 +13,7 @@ Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=-/etc/sysconfig/shorewall
|
||||
StandardOutput=syslog
|
||||
ExecStart=/sbin/shorewall $OPTIONS start
|
||||
ExecStart=/sbin/shorewall $OPTIONS start $STARTOPTIONS
|
||||
ExecStop=/sbin/shorewall $OPTIONS stop
|
||||
|
||||
[Install]
|
||||
|
@ -13,7 +13,7 @@ Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=-/etc/sysconfig/shorewall
|
||||
StandardOutput=syslog
|
||||
ExecStart=/sbin/shorewall $OPTIONS start
|
||||
ExecStart=/sbin/shorewall $OPTIONS start $STARTOPTIONS
|
||||
ExecStop=/sbin/shorewall $OPTIONS stop
|
||||
|
||||
[Install]
|
||||
|
@ -39,7 +39,7 @@ fi
|
||||
|
||||
start() {
|
||||
echo -n $"Starting Shorewall: "
|
||||
$shorewall $OPTIONS start 2>&1 | $logger
|
||||
$shorewall $OPTIONS start $STARTOPTIONS 2>&1 | $logger
|
||||
retval=${PIPESTATUS[0]}
|
||||
if [[ $retval == 0 ]]; then
|
||||
touch $lockfile
|
||||
@ -69,7 +69,7 @@ restart() {
|
||||
# Note that we don't simply stop and start since shorewall has a built in
|
||||
# restart which stops the firewall if running and then starts it.
|
||||
echo -n $"Restarting Shorewall: "
|
||||
$shorewall $OPTIONS restart 2>&1 | $logger
|
||||
$shorewall $OPTIONS restart $RESTARTOPTIONS 2>&1 | $logger
|
||||
retval=${PIPESTATUS[0]}
|
||||
if [[ $retval == 0 ]]; then
|
||||
touch $lockfile
|
||||
|
@ -39,7 +39,7 @@ fi
|
||||
|
||||
start() {
|
||||
echo -n $"Starting Shorewall: "
|
||||
$shorewall $OPTIONS start 2>&1 | $logger
|
||||
$shorewall $OPTIONS start $STARTOPTIONS 2>&1 | $logger
|
||||
retval=${PIPESTATUS[0]}
|
||||
if [[ $retval == 0 ]]; then
|
||||
touch $lockfile
|
||||
@ -69,7 +69,7 @@ restart() {
|
||||
# Note that we don't simply stop and start since shorewall has a built in
|
||||
# restart which stops the firewall if running and then starts it.
|
||||
echo -n $"Restarting Shorewall: "
|
||||
$shorewall $OPTIONS restart 2>&1 | $logger
|
||||
$shorewall $OPTIONS restart $RESTARTOPTIONS 2>&1 | $logger
|
||||
retval=${PIPESTATUS[0]}
|
||||
if [[ $retval == 0 ]]; then
|
||||
touch $lockfile
|
||||
|
@ -10,8 +10,9 @@
|
||||
|
||||
OPTIONS=""
|
||||
|
||||
# Use /etc/default shorewall6 to specify $OPTIONS to run at startup, however this
|
||||
# this might prevent shorewall6 from starting. use at your own risk
|
||||
# Use /etc/default shorewall6 to specify $OPTIONS and STARTOPTIONS to
|
||||
# run at startup, however this this might prevent shorewall6 from
|
||||
# starting. use at your own risk
|
||||
if [ -f /etc/default/shorewall6 ] ; then
|
||||
. /etc/default/shorewall6
|
||||
fi
|
||||
@ -19,7 +20,7 @@ fi
|
||||
|
||||
start() {
|
||||
echo "Starting IPv6 shorewall rules..."
|
||||
exec /sbin/shorewall6 $OPTIONS start
|
||||
exec /sbin/shorewall6 $OPTIONS start $STARTOPTIONS
|
||||
}
|
||||
|
||||
stop() {
|
||||
@ -29,7 +30,7 @@ stop() {
|
||||
|
||||
restart() {
|
||||
echo "Restarting IPv6 shorewall rules..."
|
||||
exec /sbin/shorewall6 restart
|
||||
exec /sbin/shorewall6 restart $RESTARTOPTIONS
|
||||
}
|
||||
|
||||
status() {
|
||||
|
@ -13,7 +13,7 @@ Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=-/etc/sysconfig/shorewall6
|
||||
StandardOutput=syslog
|
||||
ExecStart=/sbin/shorewall6 $OPTIONS start
|
||||
ExecStart=/sbin/shorewall6 $OPTIONS start $STARTOPTIONS
|
||||
ExecStop=/sbin/shorewall6 $OPTIONS stop
|
||||
|
||||
[Install]
|
||||
|
@ -13,7 +13,7 @@ Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=-/etc/sysconfig/shorewall6
|
||||
StandardOutput=syslog
|
||||
ExecStart=/sbin/shorewall6 $OPTIONS start
|
||||
ExecStart=/sbin/shorewall6 $OPTIONS start $STARTOPTIONS
|
||||
ExecStop=/sbin/shorewall6 $OPTIONS stop
|
||||
|
||||
[Install]
|
||||
|
Loading…
Reference in New Issue
Block a user