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"
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
# 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
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 \
-DRSPAMD_GROUP=rspamd \
-DRSPAMD_USER=rspamd
clean::
- rm -f src/modules.c
\ No newline at end of file
+ rm -f src/modules.c