Fix clamav-milter startup script like was done on clamav-devel, to make it wait
clamd socket before start. Submitted by: ache@
This commit is contained in:
parent
3bce26b01a
commit
3c4507d8da
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=186210
1 changed files with 6 additions and 0 deletions
|
@ -35,12 +35,18 @@ start_precmd()
|
|||
rm "$clamav_milter_socket"
|
||||
fi
|
||||
rc_flags="--pidfile ${pidfile} ${flags:-$clamav_milter_flags} $clamav_milter_socket"
|
||||
for a in 1 2 3 4 5 6 7 8 9 10
|
||||
do
|
||||
[ -S "$clamav_clamd_socket" ] && break
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
# read settings, set default values
|
||||
load_rc_config $name
|
||||
: ${clamav_milter_enable="NO"}
|
||||
: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"}
|
||||
: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
|
||||
: ${clamav_milter_flags="--postmaster-only --local --outgoing --timeout=0 --max-children=50"}
|
||||
|
||||
run_rc_command "$1"
|
||||
|
|
Loading…
Reference in a new issue