Lines 1-15
Link Here
|
1 |
--- clamav-unofficial-sigs.sh.orig 2016-03-31 14:38:13 UTC |
1 |
--- clamav-unofficial-sigs.sh.orig 2016-04-01 14:36:00.000000000 +0200 |
2 |
+++ clamav-unofficial-sigs.sh |
2 |
+++ clamav-unofficial-sigs.sh 2016-04-01 18:14:26.000000000 +0200 |
3 |
@@ -158,7 +158,7 @@ minimum_required_config_version="56" |
3 |
@@ -187,7 +187,7 @@ |
4 |
version_date="31 March 2016" |
4 |
minimum_required_config_version="56" |
5 |
|
5 |
|
6 |
#default config files |
6 |
#default config files |
7 |
-config_dir="/etc/clamav-unofficial-sigs" |
7 |
-config_dir="/etc/clamav-unofficial-sigs" |
8 |
+config_dir="%%PREFIX%%/etc/clamav-unofficial-sigs" |
8 |
+config_dir="%%PREFIX%%/etc/clamav-unofficial-sigs" |
9 |
config_files=("$config_dir/master.conf" "$config_dir/os.conf" "$config_dir/user.conf") |
9 |
config_files=("$config_dir/master.conf" "$config_dir/os.conf" "$config_dir/user.conf") |
10 |
|
10 |
|
11 |
|
11 |
#Initialise |
12 |
@@ -542,6 +542,8 @@ make_signature_database_from_ascii_file |
12 |
@@ -627,6 +627,8 @@ |
13 |
#Remove the clamav-unofficial-sigs script |
13 |
#Remove the clamav-unofficial-sigs script |
14 |
remove_script () { |
14 |
remove_script () { |
15 |
echo "" |
15 |
echo "" |
Lines 18-32
Link Here
|
18 |
if [ -n "$pkg_mgr" -a -n "$pkg_rm" ] ; then |
18 |
if [ -n "$pkg_mgr" -a -n "$pkg_rm" ] ; then |
19 |
echo " This script (clamav-unofficial-sigs) was installed on the system" |
19 |
echo " This script (clamav-unofficial-sigs) was installed on the system" |
20 |
echo " via '$pkg_mgr', use '$pkg_rm' to remove the script" |
20 |
echo " via '$pkg_mgr', use '$pkg_rm' to remove the script" |
21 |
@@ -1088,9 +1090,9 @@ if [ "$sanesecurity_enabled" == "yes" ] |
21 |
@@ -1175,22 +1177,13 @@ |
22 |
db_file="" |
22 |
db_file="" |
23 |
|
|
|
24 |
xshok_pretty_echo_and_log "Sanesecurity Database & GPG Signature File Updates" "=" |
23 |
xshok_pretty_echo_and_log "Sanesecurity Database & GPG Signature File Updates" "=" |
|
|
24 |
|
25 |
- sanesecurity_mirror_ips=`dig +ignore +short $sanesecurity_url` |
25 |
- sanesecurity_mirror_ips=`dig +ignore +short $sanesecurity_url` |
|
|
26 |
- #add fallback to host if dig returns no records |
27 |
- if [ `xshok_array_count "$sanesecurity_mirror_ips"` -lt 1 ] ; then |
28 |
- sanesecurity_mirror_ips=`host -t A "$sanesecurity_url" | sed -n '/has address/{s/.*address \([^ ]*\).*/\1/;p}'` |
29 |
- fi |
26 |
+ sanesecurity_mirror_ips=`host $sanesecurity_url | sed 's/.*\s//'` |
30 |
+ sanesecurity_mirror_ips=`host $sanesecurity_url | sed 's/.*\s//'` |
|
|
31 |
|
32 |
if [ `xshok_array_count "$sanesecurity_mirror_ips"` -ge "1" ] ; then |
33 |
|
34 |
|
27 |
for sanesecurity_mirror_ip in $sanesecurity_mirror_ips ; do |
35 |
for sanesecurity_mirror_ip in $sanesecurity_mirror_ips ; do |
|
|
36 |
- sanesecurity_mirror_name="" |
28 |
- sanesecurity_mirror_name=`dig +short -x $sanesecurity_mirror_ip | command sed 's/\.$//'` |
37 |
- sanesecurity_mirror_name=`dig +short -x $sanesecurity_mirror_ip | command sed 's/\.$//'` |
|
|
38 |
- #add fallback to host if dig returns no records |
39 |
- if [ "$sanesecurity_mirror_name" == "" ] ; then |
40 |
- sanesecurity_mirror_name=`host "$sanesecurity_mirror_ip" | sed -n '/name pointer/{s/.*pointer \([^ ]*\).*/\1/;p}'` |
41 |
- fi |
29 |
+ sanesecurity_mirror_name=`host $sanesecurity_mirror_ip | sed 's/.*\s//' | sed 's/\.$//'` |
42 |
+ sanesecurity_mirror_name=`host $sanesecurity_mirror_ip | sed 's/.*\s//' | sed 's/\.$//'` |
30 |
sanesecurity_mirror_site_info="$sanesecurity_mirror_name $sanesecurity_mirror_ip" |
43 |
sanesecurity_mirror_site_info="$sanesecurity_mirror_name $sanesecurity_mirror_ip" |
31 |
xshok_pretty_echo_and_log "Sanesecurity mirror site used: $sanesecurity_mirror_site_info" |
44 |
xshok_pretty_echo_and_log "Sanesecurity mirror site used: $sanesecurity_mirror_site_info" |
32 |
rsync $rsync_output_level $no_motd --files-from=$sanesecurity_include_dbs -ctuz $connect_timeout --timeout="$rsync_max_time" --stats rsync://$sanesecurity_mirror_ip/sanesecurity $sanesecurity_dir 2>/dev/null |
45 |
$rsync_bin $rsync_output_level $no_motd --files-from=$sanesecurity_include_dbs -ctuz $connect_timeout --timeout="$rsync_max_time" --stats rsync://$sanesecurity_mirror_ip/sanesecurity $sanesecurity_dir 2>/dev/null |