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:
parent
ffc736ee71
commit
71a9fb0fb0
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
[ -r conf ] && . ./conf
|
[ -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}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'rspamd'
|
# Template file for 'rspamd'
|
||||||
pkgname=rspamd
|
pkgname=rspamd
|
||||||
version=1.2.8
|
version=1.2.8
|
||||||
revision=2
|
revision=3
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="
|
configure_args="
|
||||||
-DRSPAMD_USER=rspamd
|
-DRSPAMD_USER=rspamd
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue