projects
/
mod-security-cn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prva verzija za buster.
[mod-security-cn.git]
/
debian
/
config
diff --git
a/debian/config
b/debian/config
index
c5cc1b5
..
30a4473
100644
(file)
--- a/
debian/config
+++ b/
debian/config
@@
-6,10
+6,10
@@
set -e
. /usr/share/debconf/confmodule
if [ "$1" != reconfigure ]; then
. /usr/share/debconf/confmodule
if [ "$1" != reconfigure ]; then
- db_fget mod-security-cn/rbl seen
- if [ "$RET" = "true" ]; then
- exit 0
- fi
+ db_fget mod-security-cn/rbl seen
+ if [ "$RET" = "true" ]; then
+ exit 0
+ fi
fi
A2DIR="/etc/apache2"
fi
A2DIR="/etc/apache2"
@@
-19,39
+19,39
@@
MODSECCONF="$MODSECDIR/mod-security-cn.conf"
# chk_conf_tag ()
#
# chk_conf_tag ()
#
-# Check if configuration file has CARNet package info lines.
+# Check if configuration file has CARNET package info lines.
# return: $RET => 0 - tagged
# 1 - file does not exists
# 2 - file exists, but it is not tagged
#
chk_conf_tag () {
# return: $RET => 0 - tagged
# 1 - file does not exists
# 2 - file exists, but it is not tagged
#
chk_conf_tag () {
- local conf_file
- conf_file="$1"
- RET=1
-
- if [ -f "$conf_file" ]; then
- if egrep -q "^## Begin - Generated by CARNet package mod-security-cn$" "$conf_file"; then
- RET=0
- else
- RET=2
- fi
+ local conf_file
+ conf_file="$1"
+ RET=1
+
+ if [ -f "$conf_file" ]; then
+ if egrep -q "^## Begin - Generated by CARNET package mod-security-cn$" "$conf_file"; then
+ RET=0
+ else
+ RET=2
fi
fi
+ fi
}
}
-# Check for CARNet ModSecurity configuration file.
+# Check for CARNET ModSecurity configuration file.
#
chk_conf_tag "$MODSECCONF"
if [ $RET -eq 0 ] || [ $RET -eq 1 ]; then
#
chk_conf_tag "$MODSECCONF"
if [ $RET -eq 0 ] || [ $RET -eq 1 ]; then
- # Configuration file is tagged or does not exist - ask user
- # for RBL.
- db_title mod-security-cn - konfiguracija
- db_input critical mod-security-cn/rbl || true
- db_go || true
+ # Configuration file is tagged or does not exist - ask user
+ # for RBL.
+ db_title mod-security-cn - konfiguracija
+ db_input critical mod-security-cn/rbl || true
+ db_go || true
else
else
- # Configuration file is not tagged - skip question.
- db_set mod-security-cn/rbl false || true
- db_fset mod-security-cn/rbl seen true
+ # Configuration file is not tagged - skip question.
+ db_set mod-security-cn/rbl false || true
+ db_fset mod-security-cn/rbl seen true
fi
exit 0
fi
exit 0