This repository has been archived by the owner on Sep 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 173
/
oneclick.sh
executable file
·77 lines (62 loc) · 1.99 KB
/
oneclick.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
#!/bin/sh
# 一键安装onmp
# @Author: xzhih
# @Date: 2018-03-19 04:44:09
# @Last Modified by: xzhih
# @Last Modified time: 2018-10-08 01:51:35
# sh -c "$(curl -kfsSL http://192.168.4.126:4000/oneclick.sh)"
cat << EOF
___ ___ ___ ___
/ /\ /__/\ /__/\ / /\
/ /::\ \ \:\ | |::\ / /::\
/ /:/\:\ \ \:\ | |:|:\ / /:/\:\
/ /:/ \:\ _____\__\:\ __|__|:|\:\ / /:/~/:/
/__/:/ \__\:\ /__/::::::::\ /__/::::| \:\ /__/:/ /:/
\ \:\ / /:/ \ \:\~~\~~\/ \ \:\~~\__\/ \ \:\/:/
\ \:\ /:/ \ \:\ ~~~ \ \:\ \ \::/
\ \:\/:/ \ \:\ \ \:\ \ \:\
\ \::/ \ \:\ \ \:\ \ \:\
\__\/ \__\/ \__\/ \__\/
=======================================================
ONMP 是一个 web 环境快速安装脚本,适用于安装了
Entware 的路由器,目前已经在 Padavan、
LEDE(openwrt)、梅林上测试成功。
项目地址:https://github.com/xzhih/ONMP
更多使用教程:https://zhih.me
EOF
Install()
{
rm -rf /opt/bin/onmp /opt/onmp
mkdir -p /opt/onmp
# 获取onmp脚本
curl -kfsSL https://raw.githubusercontent.com/xzhih/ONMP/master/onmp.sh > /opt/onmp/onmp.sh
# curl -kfsSL http://192.168.4.126:4000/onmp.sh > /opt/onmp/onmp.sh
chmod +x /opt/onmp/onmp.sh
# 获取php探针文件
curl -kfsSL https://raw.githubusercontent.com/WuSiYu/PHP-Probe/master/tz.php > /opt/onmp/tz.php
/opt/onmp/onmp.sh
}
Updata()
{
rm -rf /opt/onmp/onmp.sh
curl -kfsSL https://raw.githubusercontent.com/xzhih/ONMP/master/onmp.sh > /opt/onmp/onmp.sh
# curl -kfsSL http://192.168.4.126:4000/onmp.sh > /opt/onmp/onmp.sh
chmod +x /opt/onmp/onmp.sh
/opt/onmp/onmp.sh renewsh > /dev/null 2>&1
echo "升级完成"
}
start()
{
#
cat << EOF
(1) 开始安装
(2) 升级脚本
EOF
read -p "请输入:" input
case $input in
1 ) Install;;
2) Updata;;
*) exit;;
esac
}
start