-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstaller.sh
144 lines (119 loc) · 6.45 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
138
139
140
141
142
143
144
#!/bin/sh
#wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/installer.sh -O - | /bin/sh
VERSION=1.3
PLUGIN_PATH='/usr/lib/enigma2/python/Plugins/Extensions/MultiStalker'
STALKER_CONF='/home/stalker.conf'
if [ -f /etc/apt/apt.conf ] ; then
STATUS='/var/lib/dpkg/status'
OS='DreamOS'
elif [ -f /etc/opkg/opkg.conf ] ; then
STATUS='/var/lib/opkg/status'
OS='Opensource'
fi
if python --version 2>&1 | grep -q '^Python 3\.'; then
echo "You have Python3 image"
PYTHON='PY3'
PYTHONPACK='python3-requests'
else
echo "You have Python2 image"
PYTHON='PY2'
PYTHONPACK='python-requests'
fi
if [ -d $PLUGIN_PATH ]; then
rm -rf $PLUGIN_PATH
fi
CHECK='/tmp/check'
uname -m > $CHECK
sleep 1;
if grep -qs -i 'mips' cat $CHECK ; then
echo "[ Your device is MIPS ]"
if [ $PYTHON = "PY3" ]; then
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/py3/mipsel/multistalker$VERSION-py3-mipsel.tar.gz -O /tmp/multistalker$VERSION-py3-mipsel.tar.gz
tar -xzf /tmp/multistalker$VERSION-py3-mipsel.tar.gz -C /
rm -f /tmp/multistalker$VERSION-py3-mipsel.tar.gz
if [ ! -f '/usr/lib/libpython3.7m.so.1.0' ]; then
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/py3/mipsel/libpython3.7-mipsel.tar.gz -O /tmp/libpython3.7-mipsel.tar.gz
tar -xzf /tmp/libpython3.7-mipsel.tar.gz -C /
rm -f /tmp/libpython3.7-mipsel.tar.gz
echo "Send libpython3.7m"
fi
else
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/py2/mipsel/multistalker$VERSION-py2-mipsel.tar.gz -O /tmp/multistalker$VERSION-py2-mipsel.tar.gz
tar -xzf /tmp/multistalker$VERSION-py2-mipsel.tar.gz -C /
rm -f /tmp/multistalker$VERSION-py2-mipsel.tar.gz
fi
elif grep -qs -i 'armv7l' cat $CHECK ; then
echo "[ Your device is armv7l ]"
if [ $PYTHON = "PY3" ]; then
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/py3/arm/multistalker$VERSION-py3-arm.tar.gz -O /tmp/multistalker$VERSION-py3-arm.tar.gz
tar -xzf /tmp/multistalker$VERSION-py3-arm.tar.gz -C /
rm -f /tmp/multistalker$VERSION-py3-arm.tar.gz
if [ ! -f '/usr/lib/libpython3.7m.so.1.0' ]; then
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/py3/arm/libpython3.7-arm.tar.gz -O /tmp/libpython3.7-arm.tar.gz
tar -xzf /tmp/libpython3.7-arm.tar.gz -C /
rm -f /tmp/libpython3.7-arm.tar.gz
echo "Send libpython3.7m"
fi
else
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/py2/arm/multistalker$VERSION-py2-arm.tar.gz -O /tmp/multistalker$VERSION-py2-arm.tar.gz
tar -xzf /tmp/multistalker$VERSION-py2-arm.tar.gz -C /
rm -f /tmp/multistalker$VERSION-py2-arm.tar.gz
fi
elif grep -qs -i 'aarch64' cat $CHECK ; then
echo "[ Your device is aarch64 ]"
if [ $PYTHON = "PY3" ]; then
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/py3/aarch64/multistalker$VERSION-py3-aarch64.tar.gz -O /tmp/multistalker$VERSION-py3-aarch64.tar.gz
tar -xzf /tmp/multistalker$VERSION-py3-aarch64.tar.gz -C /
rm -f /tmp/multistalker$VERSION-py3-aarch64.tar.gz
if [ ! -f '/usr/lib/libpython3.7m.so.1.0' ]; then
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/py3/aarch64/libpython3.7-aarch64.tar.gz -O /tmp/libpython3.7-aarch64.tar.gz
tar -xzf /tmp/libpython3.7-aarch64.tar.gz -C /
rm -f /tmp/libpython3.7-aarch64.tar.gz
echo "Send libpython3.7m"
fi
else
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/py2/aarch64/multistalker$VERSION-py2-aarch64.tar.gz -O /tmp/multistalker$VERSION-py2-aarch64.tar.gz
tar -xzf /tmp/multistalker$VERSION-py2-aarch64.tar.gz -C /
rm -f /tmp/multistalker$VERSION-py2-aarch64.tar.gz
fi
elif grep -qs -i 'sh4' cat $CHECK ; then
echo "[ Your device is sh4 ]"
if [ $PYTHON = "PY3" ]; then
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/py3/sh4/multistalker$VERSION-py3-sh4.tar.gz -O /tmp/multistalker$VERSION-py3-sh4.tar.gz
tar -xzf /tmp/multistalker$VERSION-py3-sh4.tar.gz -C /
rm -f /tmp/multistalker$VERSION-py3-sh4.tar.gz
if [ ! -f '/usr/lib/libpython3.7m.so.1.0' ]; then
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/py3/sh4/libpython3.7-sh4.tar.gz -O /tmp/libpython3.7-sh4.tar.gz
tar -xzf /tmp/libpython3.7-sh4.tar.gz -C /
rm -f /tmp/libpython3.7-sh4.tar.gz
echo "Send libpython3.7m"
fi
else
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/py2/sh4/multistalker$VERSION-py2-sh4.tar.gz -O /tmp/multistalker$VERSION-py2-sh4.tar.gz
tar -xzf /tmp/multistalker$VERSION-py2-sh4.tar.gz -C /
rm -f /tmp/multistalker$VERSION-py2-sh4.tar.gz
fi
else
echo "Your device is not supported"
exit 1
fi
if [ ! -f $STALKER_CONF ]; then
wget -q "--no-check-certificate" https://raw.githubusercontent.com/ziko-ZR1/Multi-Stalker-install/main/Downloads/stalker-conf.tar.gz -O /tmp/stalker-conf.tar.gz
tar -xzf /tmp/stalker-conf.tar.gz -C /
rm -f /tmp/stalker-conf.tar.gz
echo "Send $STALKER_CONF"
fi
echo ""
echo "#########################################################"
echo "# MultiStalker $VERSION INSTALLED SUCCESSFULLY #"
echo "# BY ziko-ZR1 #"
echo "#########################################################"
echo "# Restart Enigma2 GUI #"
echo "#########################################################"
sleep 2
if [ $OS = 'DreamOS' ]; then
systemctl restart enigma2
else
killall -9 enigma2
fi
exit 0