forked from qiwihui/hiwifi-ss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shadow.sh
67 lines (61 loc) · 1.93 KB
/
shadow.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
#!/bin/sh
#
echo 'Go!'
sleep 2
echo '创建临时目录'
echo ''
mkdir /tmp/geewan
cd /tmp/geewan
echo 'Done! 成功创建临时目录!'
echo ''
sleep 3
echo '下载插件'
echo ''
if [ $1 == "12515805s" ]; then
echo ">1.2.5.15805s"
curl -k https://raw.githubusercontent.com/qiwihui/pinlin168/master/ss.12515805s.tar.gz -o ss.tar.gz
else
echo "<1.2.5.15805s"
curl -k https://raw.githubusercontent.com/qiwihui/pinlin168/master/ss.tar.gz -o ss.tar.gz
fi
echo 'Done! 下载完成'
echo ''
sleep 3
echo -n "备份系统文件...."
if [ -f /usr/lib/lua/luci/view/admin_web/menu/menu_left.htm.ssbak ]; then
echo -e "...[\e[31m备份已存在\e[0m]"
else
cp -a /usr/lib/lua/luci/view/admin_web/menu/menu_left.htm /usr/lib/lua/luci/view/admin_web/menu/menu_left.htm.ssbak
echo -e "....[\e[32m备份完成\e[0m]"
fi
echo '安装插件...'
tar xzvf ss.tar.gz -C / >>/dev/null
echo -e '...[\e[32m安装成功\e[0m]'
echo ''
sleep 3
echo '添加卸载信息...'
echo ''
echo '' >>/usr/lib/opkg/status
echo 'Package: geewan-ss' >>/usr/lib/opkg/status
echo 'Version: master-20130924-eb9d31869e1d7590cd8c2fb1e7d226ac6cf32fad-20141024' >>/usr/lib/opkg/status
echo 'Provides:' >>/usr/lib/opkg/status
echo 'Status: install hold installed' >>/usr/lib/opkg/status
echo 'Architecture: ralink' >>/usr/lib/opkg/status
echo 'Installed-Time: 1422509506' >>/usr/lib/opkg/status
echo 'Auto-Installed: yes' >>/usr/lib/opkg/status
echo '' >>/usr/lib/opkg/status
echo '清理临时文件...'
echo ''
if test -e /var/run/luci-indexcache; then
rm /var/run/luci-indexcache && echo 'Done! 清理完成 ' && echo '';
else
echo 'luci-cache does not exist! 无法找到luci-cache,请确定是否是极路由环境' && echo ''
fi
rm -rf /tmp/geewan
sleep 3
echo '插件成功安装!'
echo '1987年9月14日21时07分'
echo '中国第一封电子邮件'
echo '从北京发往德国'
echo '越过长城,走向世界'
echo 'Done! Hello World! 一切就绪,你好世界!'