-
Notifications
You must be signed in to change notification settings - Fork 4
/
installer.sh
137 lines (121 loc) · 3.56 KB
/
installer.sh
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/bin/bash
##setup command=wget -q "--no-check-certificate" https://raw.githubusercontent.com/Belfagor2005/vavoo/main/installer.sh -O - | /bin/sh
######### Only This 2 lines to edit with new version ######
version='1.32'
changelog='\nFix Crash on DreamOs'
##############################################################
TMPPATH=/tmp/vavoo-main
FILEPATH=/tmp/main.tar.gz
if [ ! -d /usr/lib64 ]; then
PLUGINPATH=/usr/lib/enigma2/python/Plugins/Extensions/vavoo
else
PLUGINPATH=/usr/lib64/enigma2/python/Plugins/Extensions/vavoo
fi
## check depends packges
if [ -f /var/lib/dpkg/status ]; then
STATUS=/var/lib/dpkg/status
OSTYPE=DreamOs
else
STATUS=/var/lib/opkg/status
OSTYPE=Dream
fi
echo ""
if [ -f /usr/bin/wget ]; then
echo "wget exist"
else
if [ $OSTYPE = "DreamOs" ]; then
echo "dreamos"
apt-get update && apt-get install wget
else
opkg update && opkg install wget
fi
fi
if python --version 2>&1 | grep -q '^Python 3\.'; then
echo "You have Python3 image"
PYTHON=PY3
Packagesix=python3-six
Packagerequests=python3-requests
else
echo "You have Python2 image"
PYTHON=PY2
Packagerequests=python-requests
fi
if [ $PYTHON = "PY3" ]; then
if grep -qs "Package: $Packagesix" cat $STATUS ; then
echo ""
else
opkg update && opkg --force-reinstall --force-overwrite install python3-six
fi
fi
echo ""
if grep -qs "Package: $Packagerequests" cat $STATUS ; then
echo ""
else
echo "Need to install $Packagerequests"
echo ""
if [ $OSTYPE = "DreamOs" ]; then
apt-get update && apt-get install python-requests -y
elif [ $PYTHON = "PY3" ]; then
opkg update && opkg --force-reinstall --force-overwrite install python3-requests
elif [ $PYTHON = "PY2" ]; then
opkg update && opkg --force-reinstall --force-overwrite install python-requests
fi
fi
echo ""
## Remove tmp directory
[ -r $TMPPATH ] && rm -f $TMPPATH > /dev/null 2>&1
## Remove tmp directory
[ -r $FILEPATH ] && rm -f $FILEPATH > /dev/null 2>&1
## Remove old plugin directory
[ -r $PLUGINPATH ] && rm -rf $PLUGINPATH
## Download and install plugin
## check depends packges
mkdir -p $TMPPATH
cd $TMPPATH
set -e
if [ $OSTYPE = "DreamOs" ]; then
echo "# Your image is OE2.5/2.6 #"
echo ""
else
echo "# Your image is OE2.0 #"
echo ""
fi
if [ $OSTYPE != "DreamOs" ]; then
opkg update && opkg --force-reinstall --force-overwrite install ffmpeg gstplayer exteplayer3 enigma2-plugin-systemplugins-serviceapp
fi
sleep 2
wget --no-check-certificate 'https://github.com/Belfagor2005/vavoo/archive/refs/heads/main.tar.gz'
tar -xzf main.tar.gz
cp -r 'vavoo-main/usr' '/'
set +e
cd
sleep 2
### Check if plugin installed correctly
if [ ! -d $PLUGINPATH ]; then
echo "Some thing wrong .. Plugin not installed"
exit 1
fi
rm -rf $TMPPATH > /dev/null 2>&1
sync
# # Identify the box type from the hostname file
FILE="/etc/image-version"
box_type=$(head -n 1 /etc/hostname)
distro_value=$(grep '^distro=' "$FILE" | awk -F '=' '{print $2}')
distro_version=$(grep '^version=' "$FILE" | awk -F '=' '{print $2}')
python_vers=$(python --version 2>&1)
echo "#########################################################
# INSTALLED SUCCESSFULLY #
# developed by LULULLA #
# https://corvoboys.org #
#########################################################
# your Device will RESTART Now #
#########################################################
^^^^^^^^^^Debug information:
BOX MODEL: $box_type
OO SYSTEM: $OSTYPE
PYTHON: $python_vers
IMAGE NAME: $distro_value
IMAGE VERSION: $distro_version"
sleep 5
killall -9 enigma2
exit 0