aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-11-30 00:41:22 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-11-30 00:41:22 +0000
commit2944dcc97c4141cce9ca17383345d14725534167 (patch)
tree06edb08787c47af4ce2450a831c62ebd9274331d
parente1439d06d2a23c24a6559e07b5c27c672a8e012c (diff)
downloadrspamd-2944dcc97c4141cce9ca17383345d14725534167.tar.gz
rspamd-2944dcc97c4141cce9ca17383345d14725534167.zip
Fix debian spec.0.6.0
-rw-r--r--debian/preinst5
-rwxr-xr-xdebian/rules4
2 files changed, 6 insertions, 3 deletions
diff --git a/debian/preinst b/debian/preinst
index df0404b10..9127115e1 100644
--- a/debian/preinst
+++ b/debian/preinst
@@ -17,6 +17,7 @@ set -e
case "$1" in
install)
SERVER_HOME=/var/lib/rspamd
+ SERVER_RUN=/var/run/rspamd
SERVER_LOG=/var/log/rspamd
SERVER_USER=rspamd
SERVER_NAME="Rspamd spam filtering system"
@@ -31,6 +32,7 @@ case "$1" in
fi
# 2. create homedir if not existing
test -d $SERVER_HOME || mkdir $SERVER_HOME
+ test -d $SERVER_RUN || mkdir $SERVER_RUN
test -d $SERVER_LOG || mkdir $SERVER_LOG
# 3. create user if not existing
if ! getent passwd | grep -q "^$SERVER_USER:"; then
@@ -51,8 +53,9 @@ case "$1" in
# 5. adjust file and directory permissions
if ! dpkg-statoverride --list $SERVER_HOME >/dev/null
then
- chown -R $SERVER_USER:$SERVER_GROUP $SERVER_HOME $SERVER_LOG
+ chown -R $SERVER_USER:$SERVER_GROUP $SERVER_HOME $SERVER_LOG $SERVER_RUN
chmod u=rwx,g=rx,o= $SERVER_HOME
+ chmod u=rwx,g=rx,o=rx $SERVER_RUN
chmod u=rwx,g=rx,o=rx $SERVER_LOG
fi
# 6. Add the user to the ADDGROUP group
diff --git a/debian/rules b/debian/rules
index b2d3902ea..24f4f2e4e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,7 +6,7 @@ include /usr/share/dpkg/buildflags.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk
-DEB_CMAKE_NORMAL_ARGS+= -DCONFDIR=/etc \
+DEB_CMAKE_NORMAL_ARGS+= -DCONFDIR=/etc/rspamd \
-DMANDIR=/usr/share/man \
-DRUNDIR=/var/run/rspamd \
-DDBDIR=/var/lib/rspamd \
@@ -19,4 +19,4 @@ DEB_CMAKE_NORMAL_ARGS+= -DCONFDIR=/etc \
-DRSPAMD_GROUP=rspamd \
-DRSPAMD_USER=rspamd
clean::
- rm -f src/modules.c \ No newline at end of file
+ rm -f src/modules.c