#!/bin/sh
[ -r conf ] && . ./conf
: ${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}
