|
@ -618,7 +618,7 @@ EOF |
|
|
_get_custom_rules() { |
|
|
_get_custom_rules() { |
|
|
local cfg="$1" custom_rules type elt value first |
|
|
local cfg="$1" custom_rules type elt value first |
|
|
custom_rules=$(e "$cfg" | cfg-get-value apache-custom-rules 2>/dev/null) || true |
|
|
custom_rules=$(e "$cfg" | cfg-get-value apache-custom-rules 2>/dev/null) || true |
|
|
if [ -z "$custom_rules" ]; then |
|
|
|
|
|
|
|
|
if [ -z "$custom_rules" -o "$custom_rules" == "None" ]; then |
|
|
return 0 |
|
|
return 0 |
|
|
fi |
|
|
fi |
|
|
type=$(echo "$custom_rules" | shyaml get-type) |
|
|
type=$(echo "$custom_rules" | shyaml get-type) |
|
@ -632,7 +632,7 @@ _get_custom_rules() { |
|
|
if [ "$first" ]; then |
|
|
if [ "$first" ]; then |
|
|
first= |
|
|
first= |
|
|
else |
|
|
else |
|
|
value+=$'\n'$'\n' |
|
|
|
|
|
|
|
|
value+=$'\n' |
|
|
fi |
|
|
fi |
|
|
first= |
|
|
first= |
|
|
value+="$elt" |
|
|
value+="$elt" |
|
@ -646,6 +646,9 @@ _get_custom_rules() { |
|
|
"str") |
|
|
"str") |
|
|
value+=$(echo "$custom_rules") |
|
|
value+=$(echo "$custom_rules") |
|
|
;; |
|
|
;; |
|
|
|
|
|
"NoneType") |
|
|
|
|
|
value="" |
|
|
|
|
|
;; |
|
|
*) |
|
|
*) |
|
|
value+=$(echo "$custom_rules") |
|
|
value+=$(echo "$custom_rules") |
|
|
;; |
|
|
;; |
|
|