diff options
Diffstat (limited to 'security/clamav/files/clamav-clamd.in')
-rw-r--r-- | security/clamav/files/clamav-clamd.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/security/clamav/files/clamav-clamd.in b/security/clamav/files/clamav-clamd.in index 6164dfaf5176..b2a606674b16 100644 --- a/security/clamav/files/clamav-clamd.in +++ b/security/clamav/files/clamav-clamd.in @@ -32,4 +32,14 @@ load_rc_config "$name" : ${clamav_clamd_flags=""} : ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"} +start_precmd=clamav_clamd_precmd + +#clamav .93 won't start without a valid main.cvd file +clamav_clamd_precmd() { + if [ ! -f %%DBDIR%%/main.cvd ];then + echo "Missing %%DBDIR%%/clamav/*.cvd files. You must run freshclam first" + exit 1 + fi +} + run_rc_command "$1" |