#!/sbin/openrc-run

pidfile="/var/amavis/amavisd-milter.pid"

name=amavisd-milter
command="/usr/sbin/$name"
command_args="-f -B -w $workdir -s $socket_milter -S $socket_amavis -m $connections"
command_background="yes"

start_stop_daemon_args="--user $user:$group"

depend() {
	need amavisd
	need net
	after firewall
}

start_post() {
	chmod 0770 "$socket_milter"
}
