ONMP/oneclick.sh
2022-11-07 12:29:24 +08:00

79 lines
2.0 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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、
LEDEopenwrt、梅林上测试成功。
项目地址https://github.com/xzhih/ONMP
更多使用教程https://zhih.me
EOF
Install()
{
rm -rf /opt/bin/onmp /opt/onmp
mkdir -p /opt/onmp
# 获取onmp脚本
curl -kfsSL http://git.axibug.com/JackLee/ONMP/raw/branch/master/onmp.sh > /opt/onmp/onmp.sh
# curl -kfsSL http://192.168.4.237:4000/onmp.sh > /opt/onmp/onmp.sh
chmod +x /opt/onmp/onmp.sh
# 获取php探针文件
curl -kfsSL http://www.yahei.net/tz/tz.zip > /opt/onmp/tz.zip
chmod +x /opt/onmp/tz.zip
unzip /opt/onmp/tz.zip
/opt/onmp/onmp.sh
}
Updata()
{
rm -rf /opt/onmp/onmp.sh
curl -kfsSL http://git.axibug.com/JackLee/ONMP/raw/branch/master/onmp.sh > /opt/onmp/onmp.sh
# curl -kfsSL http://192.168.4.237: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