From 2944dcc97c4141cce9ca17383345d14725534167 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 30 Nov 2013 00:41:22 +0000 Subject: [PATCH] Fix debian spec. --- debian/preinst | 5 ++++- debian/rules | 4 ++-- 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 -- 2.39.5