rspamd: run script fixes (#4475)

The default rspamd config needs a writable log directory and run
directory.

Additionally, rspamd refuses to start if run as root.
This commit is contained in:
John Regan 2016-07-17 13:35:19 -05:00 committed by Juan RP
parent ffc736ee71
commit 71a9fb0fb0
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
#!/bin/sh
[ -r conf ] && . ./conf
exec rspamd -f ${OPTS}
: ${RSPAMDUSER:=rspamd}
: ${RSPAMDGROUP:=rspamd}
for dir in /var/log/rspamd /run/rspamd; do
if [ ! -d $dir ]; then
install -d -m 0755 -o $RSPAMDUSER -g $RSPAMDGROUP $dir
fi
done
exec rspamd -u $RSPAMDUSER -g $RSPAMDGROUP -f ${OPTS}

View File

@ -1,7 +1,7 @@
# Template file for 'rspamd'
pkgname=rspamd
version=1.2.8
revision=2
revision=3
build_style=cmake
configure_args="
-DRSPAMD_USER=rspamd