]> source.dussan.org Git - rspamd.git/commitdiff
Fix debian spec. 0.6.0
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 30 Nov 2013 00:41:22 +0000 (00:41 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 30 Nov 2013 00:41:22 +0000 (00:41 +0000)
debian/preinst
debian/rules

index df0404b10ec828dba4702c4e799225d593d83c7f..9127115e1bc2501c572782541c8cd734c34480e0 100644 (file)
@@ -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
index b2d3902eae8267e252135bfb19d2a1b43b292e14..24f4f2e4ecfeff2a1dab9a8379d39168c8138381 100755 (executable)
@@ -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