-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstallerab.sh
95 lines (83 loc) · 3.05 KB
/
installerab.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
#!/bin/sh
# ==============================================
# SCRIPT : DOWNLOAD AND INSTALL abstract-skin_2 #
# =====================================================================================================================
# Command: wget https://raw.githubusercontent.com/biko-73/xstreamity/main/installerab.sh -O - | /bin/sh #
# =====================================================================================================================
########################################################################################################################
# Plugin ... Enter Manually
########################################################################################################################
PACKAGE_DIR='xstreamity/main'
MY_IPK="enigma2-plugin-extensions-xstreamity-abstract-skin_2_all.ipk"
MY_DEB="enigma2-plugin-extensions-xstreamity-abstract-skin.deb"
########################################################################################################################
# Auto ... Do not change
########################################################################################################################
# Decide : which package ?
MY_MAIN_URL="https://raw.githubusercontent.com/biko-73/"
if which dpkg > /dev/null 2>&1; then
MY_FILE=$MY_DEB
MY_URL=$MY_MAIN_URL$PACKAGE_DIR'/'$MY_DEB
else
MY_FILE=$MY_IPK
MY_URL=$MY_MAIN_URL$PACKAGE_DIR'/'$MY_IPK
fi
MY_TMP_FILE="/tmp/"$MY_FILE
echo ''
echo '************************************************************'
echo '** STARTED **'
echo '************************************************************'
echo "** Uploaded by: Biko_73 **"
echo "** https://www.tunisia-sat.com/forums/threads/3898738/ **"
echo "************************************************************"
echo ''
# Remove previous file (if any)
rm -f $MY_TMP_FILE > /dev/null 2>&1
# Download package file
MY_SEP='============================================================='
echo $MY_SEP
echo 'Downloading '$MY_FILE' ...'
echo $MY_SEP
echo ''
wget -T 2 $MY_URL -P "/tmp/"
# Check download
if [ -f $MY_TMP_FILE ]; then
# Install
echo ''
echo $MY_SEP
echo 'Installation started'
echo $MY_SEP
echo ''
if which dpkg > /dev/null 2>&1; then
apt-get install --reinstall $MY_TMP_FILE -y
else
opkg install --force-reinstall $MY_TMP_FILE
fi
MY_RESULT=$?
# Result
echo ''
echo ''
if [ $MY_RESULT -eq 0 ]; then
echo " >>>> SUCCESSFULLY INSTALLED <<<<"
echo ''
echo " >>>> RESTARING <<<<"
if which systemctl > /dev/null 2>&1; then
sleep 2; systemctl restart enigma2
else
init 4; sleep 4; init 3;
fi
else
echo " >>>> INSTALLATION FAILED ! <<<<"
fi;
echo ''
echo '**************************************************'
echo '** FINISHED **'
echo '**************************************************'
echo ''
exit 0
else
echo ''
echo "Download failed !"
exit 1
fi
# ------------------------------------------------------------------------------------------------------------