20 | 20 |
|
21 | 21 |
default_config="/etc/clamav-unofficial-sigs.conf"
|
22 | 22 |
|
23 | |
version="v3.3 (updated 2009-05-19)"
|
|
23 |
version="v3.5.4 (updated 2009-06-25)"
|
24 | 24 |
output_ver="
|
25 | 25 |
`basename $0` $version
|
26 | 26 |
"
|
|
30 | 30 |
|
31 | 31 |
Usage: `basename $0` [OPTION] [PATH|FILE]
|
32 | 32 |
|
33 | |
-b Add a bypass signature entry to local.ign in order
|
34 | |
to temporarily resolve a false-positive issue with
|
35 | |
a third-party signature. The local.ign file will
|
36 | |
automatically be deleted and the databases reloaded
|
37 | |
once the local.ign file's timestamp is 24 hours old.
|
|
33 |
-b Add a bypass signature entry to local.ign in order to
|
|
34 |
temporarily resolve a false-positive issue with a specific
|
|
35 |
third-party signature. The script added local.ign entries
|
|
36 |
will automatically be removed if the original signature is
|
|
37 |
either modified or removed from the third-party database.
|
38 | 38 |
|
39 | 39 |
-c Direct script to use a specific configuration file
|
40 | 40 |
e.g.: '-c /path/to/`basename "$default_config"`'
|
|
58 | 58 |
|
59 | 59 |
-i Output system and configuration information for
|
60 | 60 |
viewing or possible debugging purposes
|
|
61 |
|
|
62 |
-m Make a signature database from an ascii file containing
|
|
63 |
data strings, with one data string per line. Additional
|
|
64 |
information is provided when using this flag.
|
61 | 65 |
|
62 | 66 |
-r Remove the clamav-unofficial-sigs script and all of
|
63 | 67 |
its associated files and databases from the system.
|
|
92 | 96 |
}
|
93 | 97 |
|
94 | 98 |
# Take input from the commandline and process.
|
95 | |
while getopts 'bc:defg:hirs:v' option ; do
|
|
99 |
while getopts 'bc:defg:himrs:v' option ; do
|
96 | 100 |
case $option in
|
97 | 101 |
b) no_default_config
|
98 | 102 |
echo "Input a third-party signature name that you wish to bypass due to false-positives"
|
99 | |
echo "and press enter (do not include '.UNOFFICIAL' in the signature name nor add quote"
|
|
103 |
echo "and press enter (do not include '.UNOFFICIAL' in the signature name nor add quote"
|
100 | 104 |
echo "marks to any input string):"
|
101 | 105 |
echo ""
|
102 | 106 |
read input
|
|
104 | 108 |
then
|
105 | 109 |
cd "$clam_dbs"
|
106 | 110 |
input=`echo "$input" | tr -d "'" | tr -d '"'`
|
107 | |
sig_ign=`grep -n "$input:" *.ndb | cut -d ":" -f-3`
|
|
111 |
file_sig=`grep -n "$input:" *.ndb`
|
|
112 |
sig_ign=`echo "$file_sig" | cut -d ":" -f-3`
|
108 | 113 |
if [ -n "$sig_ign" ]
|
109 | 114 |
then
|
110 | 115 |
if ! grep "$sig_ign" local.ign > /dev/null 2>&1
|
111 | 116 |
then
|
112 | |
echo "$sig_ign" >> local.ign
|
113 | |
perms chown $clam_user:$clam_group local.ign
|
114 | |
chmod 0644 local.ign
|
115 | |
$reload_opt
|
116 | |
echo ""
|
117 | |
echo "Signature '$input' has been added to local.ign and databases have been reloaded."
|
118 | |
echo "The local.ign file will automatically be deleted once the file's timestamp is 24 hour old."
|
|
117 |
cp -f local.ign "$config_dir" 2>/dev/null
|
|
118 |
echo "$sig_ign" | tr -d "\r" >> "$config_dir/local.ign"
|
|
119 |
echo "$file_sig" | tr -d "\r" >> "$config_dir/monitor-ign.txt"
|
|
120 |
if clamscan --quiet -d $config_dir/local.ign $config_dir/scan-test.txt
|
|
121 |
then
|
|
122 |
if rsync -cqt $config_dir/local.ign $clam_dbs
|
|
123 |
then
|
|
124 |
perms chown $clam_user:$clam_group local.ign
|
|
125 |
chmod 0644 local.ign "$config_dir/monitor-ign.txt"
|
|
126 |
$reload_opt
|
|
127 |
echo ""
|
|
128 |
echo "Signature '$input' has been added to the local.ign signature bypass"
|
|
129 |
echo "file and databases have been reloaded. The script will track any changes to the"
|
|
130 |
echo "offending third-party signature and will automatically remove the signature bypass"
|
|
131 |
echo "entry if either the signature is modified or removed from the third-party database."
|
|
132 |
else
|
|
133 |
echo ""
|
|
134 |
echo "Failed to successfully update local.ign file - SKIPPING."
|
|
135 |
fi
|
|
136 |
else
|
|
137 |
echo ""
|
|
138 |
echo "Clamscan reports local.ign database integrity is bad - SKIPPING."
|
|
139 |
fi
|
119 | 140 |
else
|
120 | 141 |
echo ""
|
121 | 142 |
echo "Signature '$input' already exists in local.ign - no action taken."
|
|
124 | 145 |
echo ""
|
125 | 146 |
echo "Signature '$input' could not be found."
|
126 | 147 |
echo ""
|
127 | |
echo "This script will only create a bypass entry in local.ign for ClamAV"
|
|
148 |
echo "This script will only create a bypass entry in local.ign for ClamAV."
|
128 | 149 |
echo "'UNOFFICIAL' third-Party signatures as found in the *.ndb databases."
|
129 | 150 |
fi
|
130 | 151 |
else
|
|
258 | 279 |
echo ""
|
259 | 280 |
exit
|
260 | 281 |
;;
|
|
282 |
m) no_default_config
|
|
283 |
echo "
|
|
284 |
The '-m' script flag provides a way to create a ClamAV hexadecimal signature database (*.ndb) file
|
|
285 |
from a list of data strings stored in a clear-text ascii file, with one data string entry per line.
|
|
286 |
|
|
287 |
- Hexadecimal encoding can be either 'full' or 'formatted' on a per line basis:
|
|
288 |
|
|
289 |
Full line encoding should be used if there are no formatted spacing entries [{}, (), *]
|
|
290 |
included on the line. Prefix unformatted lines with: '-:' (no quote marks).
|
|
291 |
|
|
292 |
Example:
|
|
293 |
|
|
294 |
-:This signature contains no formatted spacing fields
|
|
295 |
|
|
296 |
Encodes to:
|
|
297 |
|
|
298 |
54686973207369676e617475726520636f6e7461696e73206e6f20666f726d61747465642073706163696e67206669656c6473
|
|
299 |
|
|
300 |
Formatted line encoding should be used if there are user added spacing entries [{}, (), *]
|
|
301 |
included on the line. Prefix formatted lines with '=:' (no quote marks).
|
|
302 |
|
|
303 |
Example:
|
|
304 |
|
|
305 |
=:This signature{-10}contains several(5|6|7)formatted spacing*fields
|
|
306 |
|
|
307 |
Encodes to:
|
|
308 |
|
|
309 |
54686973207369676e6174757265{-10}636f6e7461696e73207365766572616c(5|6|7)666f726d61747465642073706163696e67*6669656c6473
|
|
310 |
|
|
311 |
Use 'full' encoding if you want to encode everything on the line [including {}, (), *] and 'formatted'
|
|
312 |
encoding if you want to encode everything on the line except the formatted character spacing fields.
|
|
313 |
|
|
314 |
The prefixes ('-:' and '=:') will be stripped from the line before hexadecimal encoding is done.
|
|
315 |
If no prefix is found at the beginning of the line, full line encoding will be done (default).
|
|
316 |
|
|
317 |
- It is assumed that the signatures will be created for email scanning purposes, thus the '4'
|
|
318 |
target type is used and full file scanning is enabled (see ClamAV signatures.pdf for details).
|
|
319 |
|
|
320 |
- Line numbering will be done automatically by the script.
|
|
321 |
" | sed 's/^ //g'
|
|
322 |
echo -n "Do you wish to continue? (y/n): "
|
|
323 |
read reply
|
|
324 |
if [ "$reply" = "y" -o "$reply" = "Y" ]
|
|
325 |
then
|
|
326 |
echo ""
|
|
327 |
echo -n "Enter the source file as /path/filename: "
|
|
328 |
read source
|
|
329 |
if [ -s "$source" ]
|
|
330 |
then
|
|
331 |
source_file=`basename "$source"`
|
|
332 |
echo ""
|
|
333 |
echo "What signature prefix would you like to use? For example: 'Phish.Domains'"
|
|
334 |
echo "will create signatures that looks like: 'Phish.Domains.1:4:*:HexSigHere'"
|
|
335 |
echo ""
|
|
336 |
echo -n "Enter signature prefix: "
|
|
337 |
read prefix
|
|
338 |
path_file=`echo "$source" | cut -d "." -f-1 | sed 's/$/.ndb/'`
|
|
339 |
db_file=`basename $path_file`
|
|
340 |
rm -f "$path_file"
|
|
341 |
total=`wc -l "$source" | cut -d " " -f1`
|
|
342 |
line_num=1
|
|
343 |
echo ""
|
|
344 |
cat "$source" | while read line ; do
|
|
345 |
line_prefix=`echo "$line" | awk -F ':' '{print $1}'`
|
|
346 |
if [ "$line_prefix" = "-" ]
|
|
347 |
then
|
|
348 |
echo "$line" | cut -d ":" -f2- | perl -pe 's/(.)/sprintf("%02lx", ord $1)/eg' | sed "s/^/$prefix\.$line_num:4:\*:/" >> "$path_file"
|
|
349 |
elif [ "$line_prefix" = "=" ] ; then
|
|
350 |
echo "$line" | cut -d ":" -f2- | perl -pe 's/(\{[^}]*\}|\([^)]*\)|\*)|(.)/defined $1 ? $1 : sprintf("%02lx", ord $2)/eg' | sed "s/^/$prefix\.$line_num:4:\*:/" >> "$path_file"
|
|
351 |
else
|
|
352 |
echo "$line" | perl -pe 's/(.)/sprintf("%02lx", ord $1)/eg' | sed "s/^/$prefix\.$line_num:4:\*:/" >> "$path_file"
|
|
353 |
fi
|
|
354 |
echo -ne "Hexadecimal encoding $source_file line: $line_num of $total\r"
|
|
355 |
line_num=$(($line_num + 1))
|
|
356 |
done
|
|
357 |
else
|
|
358 |
echo ""
|
|
359 |
echo "Source file not found, exiting..."
|
|
360 |
echo ""
|
|
361 |
exit
|
|
362 |
fi
|
|
363 |
echo ""
|
|
364 |
echo ""
|
|
365 |
echo "Signature database file created at: $path_file"
|
|
366 |
if clamscan --quiet -d $path_file $config_dir/scan-test.txt 2>/dev/null
|
|
367 |
then
|
|
368 |
echo ""
|
|
369 |
echo "Clamscan reports database integrity tested good."
|
|
370 |
echo ""
|
|
371 |
echo -n "Would you like to move '$db_file' into '$clam_dbs' and reload databases? (y/n): "
|
|
372 |
read reply
|
|
373 |
if [ "$reply" = "y" -o "$reply" = "Y" ]
|
|
374 |
then
|
|
375 |
if ! cmp -s "$path_file" "$clam_dbs/$db_file"
|
|
376 |
then
|
|
377 |
if rsync -cqt "$path_file" "$clam_dbs"
|
|
378 |
then
|
|
379 |
perms chown $clam_user:$clam_group "$clam_dbs/$db_file"
|
|
380 |
chmod 0644 "$clam_dbs/$db_file"
|
|
381 |
$reload_opt
|
|
382 |
echo ""
|
|
383 |
echo "Signature database '$db_file' was successfully implemented and ClamD databases reloaded."
|
|
384 |
else
|
|
385 |
echo ""
|
|
386 |
echo "Failed to add/update '$db_file', ClamD database not reloaded."
|
|
387 |
fi
|
|
388 |
else
|
|
389 |
echo ""
|
|
390 |
echo "Database '$db_file' has not changed - skipping"
|
|
391 |
fi
|
|
392 |
else
|
|
393 |
echo ""
|
|
394 |
echo "No action taken."
|
|
395 |
fi
|
|
396 |
else
|
|
397 |
echo ""
|
|
398 |
echo "Clamscan reports that '$db_file' signature database integrity tested bad."
|
|
399 |
fi
|
|
400 |
fi
|
|
401 |
echo ""
|
|
402 |
exit
|
|
403 |
;;
|
261 | 404 |
r) no_default_config
|
262 | 405 |
if [ -n "$pkg_mgr" -a -n "$pkg_rm" ]
|
263 | 406 |
then
|
|
278 | 421 |
rm -f -- "$file"
|
279 | 422 |
echo " Removed file: $file"
|
280 | 423 |
done
|
281 | |
cron_file=`find /etc/ -name clamav-unofficial-sigs.cron`
|
|
424 |
cron_file=`find /etc/ -name clamav-unofficial-sigs-cron`
|
282 | 425 |
if [ -s "$cron_file" ] ; then
|
283 | 426 |
rm -f "$cron_file"
|
284 | 427 |
echo " Removed file: $cron_file"
|
285 | 428 |
fi
|
286 | |
log_rotate_file=`find /etc/ -name clamav-unofficial-sigs.logrotate`
|
|
429 |
log_rotate_file=`find /etc/ -name clamav-unofficial-sigs-logrotate`
|
287 | 430 |
if [ -s "$log_rotate_file" ] ; then
|
288 | 431 |
rm -f "$log_rotate_file"
|
289 | 432 |
echo " Removed file: $log_rotate_file"
|
|
570 | 713 |
# Create "purge.txt" file for package maintainers to support package uninstall.
|
571 | 714 |
purge="$config_dir/purge.txt"
|
572 | 715 |
cp -f "$current_dbs" "$purge"
|
573 | |
echo "$config_dir/current-dbs.txt" >> $purge
|
574 | |
echo "$config_dir/db-changes.txt" >> $purge
|
575 | |
echo "$config_dir/last-mbl-update.txt" >> $purge
|
576 | |
echo "$config_dir/last-si-update.txt" >> $purge
|
577 | |
echo "$config_dir/msrbl-include-dbs.txt" >> $purge
|
578 | |
echo "$config_dir/previous-dbs.txt" >> $purge
|
579 | |
echo "$config_dir/scan-test.txt" >> $purge
|
580 | |
echo "$config_dir/ss-include-dbs.txt" >> $purge
|
581 | |
echo "$gpg_dir/publickey.gpg" >> $purge
|
582 | |
echo "$gpg_dir/secring.gpg" >> $purge
|
583 | |
echo "$gpg_dir/ss-keyring.gpg*" >> $purge
|
584 | |
echo "$gpg_dir/trustdb.gpg" >> $purge
|
585 | |
echo "$log_file_path/$log_file_name*" >> $purge
|
|
716 |
echo "$config_dir/current-dbs.txt" >> "$purge"
|
|
717 |
echo "$config_dir/db-changes.txt" >> "$purge"
|
|
718 |
echo "$config_dir/last-mbl-update.txt" >> "$purge"
|
|
719 |
echo "$config_dir/last-si-update.txt" >> "$purge"
|
|
720 |
echo "$config_dir/local.ign" >> "$purge"
|
|
721 |
echo "$config_dir/monitor-ign.txt" >> "$purge"
|
|
722 |
echo "$config_dir/msrbl-include-dbs.txt" >> "$purge"
|
|
723 |
echo "$config_dir/previous-dbs.txt" >> "$purge"
|
|
724 |
echo "$config_dir/scan-test.txt" >> "$purge"
|
|
725 |
echo "$config_dir/ss-include-dbs.txt" >> "$purge"
|
|
726 |
echo "$gpg_dir/publickey.gpg" >> "$purge"
|
|
727 |
echo "$gpg_dir/secring.gpg" >> "$purge"
|
|
728 |
echo "$gpg_dir/ss-keyring.gpg*" >> "$purge"
|
|
729 |
echo "$gpg_dir/trustdb.gpg" >> "$purge"
|
|
730 |
echo "$log_file_path/$log_file_name*" >> "$purge"
|
586 | 731 |
echo "$purge" >> "$purge"
|
587 | 732 |
|
588 | 733 |
# Silence rsync output and only report errors - useful if script is run via cron.
|
|
738 | 883 |
log "WARNING - Systems does not support calculating time since epoch, SecuriteInfo and MalwarePatrol updates bypassed"
|
739 | 884 |
si_dbs=""
|
740 | 885 |
mbl_dbs=""
|
741 | |
fi
|
742 | |
|
743 | |
# Check to see if local.ign file exists and if it's timestamp is 24 hours old, delete the file.
|
744 | |
if [ -e "$clam_dbs/local.ign" -a -n "$current_time" ] ; then
|
745 | |
if [ -e "$clam_dbs/local.ign" -a -n "$current_time" ] ; then
|
746 | |
file_time=`stat -c %Y "$clam_dbs/local.ign"`
|
747 | |
file_time_plus=$(($file_time + 86400))
|
748 | |
if [ "$current_time" -gt "$file_time_plus" ] ; then
|
749 | |
rm -f "$clam_dbs/local.ign"
|
750 | |
comment ""
|
751 | |
comment "File 'local.ign' timestamp is older than 24 hours - file deleted"
|
752 | |
log "INFO - File 'local.ign' timestamp is older than 24 hours - file deleted"
|
753 | |
do_clamd_reload=3
|
754 | |
fi
|
755 | |
fi
|
756 | 886 |
fi
|
757 | 887 |
|
758 | 888 |
################################################################
|
|
834 | 964 |
done
|
835 | 965 |
if [ "$ss_rsync_success" != "1" ] ; then
|
836 | 966 |
echo ""
|
837 | |
echo "Access to all Sanesecurity mirror sites failed - Check for connectivity issues."
|
838 | |
log "WARNING - Access to all Sanesecurity mirror sites failed - Check for connectivity issues."
|
|
967 |
echo "Access to all Sanesecurity mirror sites failed - Check for connectivity issues"
|
|
968 |
echo "or signature database name(s) misspelled in the script's configuration file."
|
|
969 |
log "WARNING - Access to all Sanesecurity mirror sites failed - Check for connectivity issues"
|
|
970 |
log "WARNING - or signature database name(s) misspelled in the script's configuration file."
|
839 | 971 |
fi
|
840 | 972 |
fi
|
841 | 973 |
|
|
902 | 1034 |
done
|
903 | 1035 |
if [ "$msrbl_rsync_success" != "1" ] ; then
|
904 | 1036 |
echo ""
|
905 | |
echo "Access to all MSRBL mirror sites failed - Check for connectivity issues."
|
906 | |
log "WARNING - Access to all MSRBL mirror sites failed - Check for connectivity issues."
|
|
1037 |
echo "Access to all MSRBL mirror sites failed - Check for connectivity issues or"
|
|
1038 |
echo "signature database name(s) misspelled in the script's configuration file."
|
|
1039 |
log "WARNING - Access to all MSRBL mirror sites failed - Check for connectivity issues or"
|
|
1040 |
log "WARNING - signature database name(s) misspelled in the script's configuration file."
|
907 | 1041 |
fi
|
908 | 1042 |
fi
|
909 | 1043 |
|
|
1151 | 1285 |
fi
|
1152 | 1286 |
fi
|
1153 | 1287 |
|
|
1288 |
# Check to see if the local.ign file exists, and if it does, check to see if any of the script
|
|
1289 |
# added bypass entries can be removed due to offending signature modifications or removals.
|
|
1290 |
comment ""
|
|
1291 |
comment "======================================================================"
|
|
1292 |
if [ -s "$clam_dbs/local.ign" -a -s "$config_dir/monitor-ign.txt" ] ; then
|
|
1293 |
ign_updated=0
|
|
1294 |
cd "$clam_dbs"
|
|
1295 |
cp -f local.ign "$config_dir/local.ign"
|
|
1296 |
for entry in `cat "$config_dir/monitor-ign.txt" 2>/dev/null` ; do
|
|
1297 |
sig_file=`echo "$entry" | tr -d "\r" | awk -F ":" '{print $1}'`
|
|
1298 |
sig_hex=`echo "$entry" | awk -F ":" '{print $NF}'`
|
|
1299 |
sig_name_old=`echo "$entry" | tr -d "\r" | awk -F ":" '{print $3}'`
|
|
1300 |
sig_ign_old=`grep "$sig_name_old" "$config_dir/local.ign"`
|
|
1301 |
sig_old=`echo "$entry" | tr -d "\r" | cut -d ":" -f3-`
|
|
1302 |
sig_new=`grep -h "$sig_hex" "$sig_file" | tr -d "\r" 2>/dev/null`
|
|
1303 |
sig_mon_new=`grep -H -n "$sig_hex" "$sig_file"`
|
|
1304 |
if [ -n "$sig_new" ]
|
|
1305 |
then
|
|
1306 |
if [ "$sig_old" != "$sig_new" -o "$entry" != "$sig_mon_new" ] ; then
|
|
1307 |
sig_name_new=`echo "$sig_new" | tr -d "\r" | awk -F ":" '{print $1}'`
|
|
1308 |
sig_ign_new=`echo "$sig_mon_new" | cut -d ":" -f1-3`
|
|
1309 |
perl -i -ne "print unless /$sig_ign_old/" "$config_dir/monitor-ign.txt"
|
|
1310 |
echo "$sig_mon_new" >> "$config_dir/monitor-ign.txt"
|
|
1311 |
perl -p -i -e "s/$sig_ign_old/$sig_ign_new/" "$config_dir/local.ign"
|
|
1312 |
comment ""
|
|
1313 |
comment "$sig_name_old hexadecimal is signature unchanged, however signature name and/or line placement"
|
|
1314 |
comment "in $sig_file has change to $sig_name_new - updated local.ign to reflect this change."
|
|
1315 |
log "INFO - $sig_name_old hexadecimal is signature unchanged, however signature name and/or line placement"
|
|
1316 |
log "INFO - in $sig_file has change to $sig_name_new - updated local.ign to reflect this change."
|
|
1317 |
ign_updated=1
|
|
1318 |
fi
|
|
1319 |
else
|
|
1320 |
perl -i -ne "print unless /$sig_ign_old/" "$config_dir/monitor-ign.txt" "$config_dir/local.ign"
|
|
1321 |
comment ""
|
|
1322 |
comment "$sig_name_old signature has been removed from $sig_file, entry removed from local.ign."
|
|
1323 |
log "INFO - $sig_name_old signature has been removed from $sig_file, entry removed from local.ign."
|
|
1324 |
ign_updated=1
|
|
1325 |
fi
|
|
1326 |
done
|
|
1327 |
if [ "$ign_updated" = "1" ] ; then
|
|
1328 |
if clamscan --quiet -d $config_dir/local.ign $config_dir/scan-test.txt
|
|
1329 |
then
|
|
1330 |
if rsync -cqt $config_dir/local.ign $clam_dbs
|
|
1331 |
then
|
|
1332 |
perms chown $clam_user:$clam_group "$clam_dbs/local.ign"
|
|
1333 |
chmod 0644 "$clam_dbs/local.ign" "$config_dir/monitor-ign.txt"
|
|
1334 |
do_clamd_reload=3
|
|
1335 |
else
|
|
1336 |
echo "Failed to successfully update local.ign file - SKIPPING"
|
|
1337 |
log "WARNING - Failed to successfully update local.ign file - SKIPPING"
|
|
1338 |
fi
|
|
1339 |
else
|
|
1340 |
echo "Clamscan reports local.ign database integrity is bad - SKIPPING"
|
|
1341 |
log "WARNING - Clamscan reports local.ign database integrity is bad - SKIPPING"
|
|
1342 |
fi
|
|
1343 |
fi
|
|
1344 |
fi
|
|
1345 |
|
1154 | 1346 |
# Set appropriate directory and file access permissions
|
1155 | 1347 |
perms chown -R $clam_user:$clam_group "$clam_dbs"
|
1156 | 1348 |
if ! find "$clam_dbs" "$work_dir" -type f -exec chmod 0644 {} + 2>/dev/null ; then
|
|
1172 | 1364 |
log "WARNING - Check the script's configuration file, 'reload_dbs' enabled but no 'reload_opt' selected"
|
1173 | 1365 |
elif [ "$reload_dbs" = "yes" -a "$do_clamd_reload" = "1" -a -n "$reload_opt" ] ; then
|
1174 | 1366 |
comment ""
|
1175 | |
comment "=================================================="
|
1176 | |
comment "= Update(s) detected, reloading ClamAV databases ="
|
1177 | |
comment "=================================================="
|
1178 | |
log "INFO - Update(s) detected, reloading ClamAV databases"
|
|
1367 |
comment "================================================="
|
|
1368 |
comment "= Update(s) detected, reloaded ClamAV databases ="
|
|
1369 |
comment "================================================="
|
|
1370 |
log "INFO - Update(s) detected, reloaded ClamAV databases"
|
1179 | 1371 |
$reload_opt
|
1180 | 1372 |
elif [ "$reload_dbs" = "yes" -a "$do_clamd_reload" = "2" -a -n "$reload_opt" ] ; then
|
1181 | 1373 |
comment ""
|
1182 | |
comment "============================================================"
|
1183 | |
comment "= Database removal(s) detected, reloading ClamAV databases ="
|
1184 | |
comment "============================================================"
|
1185 | |
log "INFO - Database removal(s) detected, reloading ClamAV databases"
|
|
1374 |
comment "==========================================================="
|
|
1375 |
comment "= Database removal(s) detected, reloaded ClamAV databases ="
|
|
1376 |
comment "==========================================================="
|
|
1377 |
log "INFO - Database removal(s) detected, reloaded ClamAV databases"
|
1186 | 1378 |
$reload_opt
|
1187 | 1379 |
elif [ "$reload_dbs" = "yes" -a "$do_clamd_reload" = "3" -a -n "$reload_opt" ] ; then
|
1188 | 1380 |
comment ""
|
1189 | |
comment "============================================================"
|
1190 | |
comment "= File 'local.ign' was deleted, reloading ClamAV databases ="
|
1191 | |
comment "============================================================"
|
1192 | |
log "INFO - File 'local.ign' was deleted, reloading ClamAV databases"
|
|
1381 |
comment "==========================================================="
|
|
1382 |
comment "= File 'local.ign' has changed, reloaded ClamAV databases ="
|
|
1383 |
comment "==========================================================="
|
|
1384 |
log "INFO - File 'local.ign' has changed, reloaded ClamAV databases"
|
1193 | 1385 |
$reload_opt
|
1194 | 1386 |
elif [ "$reload_dbs" = "yes" -a -z "$do_clamd_reload" ] ; then
|
1195 | 1387 |
comment ""
|
1196 | |
comment "========================================================="
|
1197 | |
comment "= No update(s) detected, NOT reloading ClamAV databases ="
|
1198 | |
comment "========================================================="
|
1199 | |
log "INFO - No update(s) detected, NOT reloading ClamAV databases"
|
|
1388 |
comment "============================================================="
|
|
1389 |
comment "= No update(s) detected, ClamAV databases were not reloaded ="
|
|
1390 |
comment "============================================================="
|
|
1391 |
log "INFO - No update(s) detected, ClamAV databases were not reloaded"
|
1200 | 1392 |
else
|
1201 | 1393 |
comment ""
|
1202 | 1394 |
comment "======================================================================"
|
|
1395 |
log "INFO - Database reloading has been disabled in the configuration file."
|
|
1396 |
true
|
1203 | 1397 |
fi
|
1204 | 1398 |
|
1205 | 1399 |
exit $?
|