mirror of
https://codeberg.org/scip/jaildk.git
synced 2025-12-17 04:31:02 +01:00
only generate pf ruleset if in start or restart mode
This commit is contained in:
8
jaildk
8
jaildk
@@ -303,6 +303,12 @@ jaildk_rc_pf() {
|
||||
|
||||
load-jail-config $jail
|
||||
|
||||
# TODO:
|
||||
# - put this into a separate function
|
||||
# - clean up if generation of pf-ruleset.conf fails somehow
|
||||
# - make a syntax check of the generated rules, if possible
|
||||
case $mode in
|
||||
start|restart)
|
||||
if test -n "$rules" -o -n "$maps"; then
|
||||
# generate a pf.conf based on config variables
|
||||
echo "# generated pf ruleset for jail, generated on ` date`" > $ruleset
|
||||
@@ -389,6 +395,8 @@ jaildk_rc_pf() {
|
||||
fi
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -s $ruleset; then
|
||||
anchor="$jail/jaildk"
|
||||
|
||||
Reference in New Issue
Block a user