-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathkerio-bitdefender
More file actions
38 lines (37 loc) · 1.39 KB
/
kerio-bitdefender
File metadata and controls
38 lines (37 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# This is an offline updater for bitdefender in Kerio Connect
clear
getopts "viur" opt
if [$opt -eq "v"]; then
read -p 'Choose what you want to do
1. Init script
2. Just update bitdefender
3. Remove virus bases
:' mode
fi
# Section one - init
if [$mode -eq 1 || $opt -eq "i"]; then
echo "Initialising update script"
cat 127.0.0.1 gogs.dontexist.com register.kerio.com update.kerio.com control-update.kerio.com bdupdate.kerio.com snort-update.kerio.com >> /etc/hosts
mkdir /tmp/bitdefender
cd /tmp/bitdefender
# this is for history only! http://download.bitdefender.com/updates/update_av32bit/cumulative.zip
wget http://download.bitdefender.com/updates/update_av64bit/cumulative.zip
mkdir -p /var/winroute/bitdefender/Plugins/1/
unzip cumulative.zip -d /var/winroute/bitdefender/Plugins/1/
ln -s /var/winroute/bitdefender/Plugins/1/bdcore.so.linux-x86_64 /var/winroute/bitdefender/Plugins/1/bdcore.so
# Section two - update only
elif [$mode -eq "" || $opt -eq "" || $mode -eq 2 || $opt -eq "u"]; then
echo "Initialising update script"
rm -rf /tmp/bitdefender/cumulative.zip
cd /tmp/bitdefender
wget http://download.bitdefender.com/updates/update_av64bit/cumulative.zip
unzip -u cumulative.zip -d /var/winroute/bitdefender/Plugins/1/
# Section three - remove
elif [$mode -eq 3|| $opt -eq "r"]; then
echo "Removing update script"
rm -rf /tmp/bitdefender
rm -rf /var/winroute/bitdefender/Plugins/1/
else
exit
fi