✨ v1.1.0 update shell
This commit is contained in:
parent
19c28ed5a7
commit
69f3a882c0
@ -76,15 +76,13 @@ wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubuserconte
|
||||
|
||||
- 占用端口:22022
|
||||
|
||||
> 安装:支持后续一键升级
|
||||
|
||||
#### X86架构
|
||||
```shell
|
||||
wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/chaos-zhu/easynode/master/easynode-client-install.sh | bash
|
||||
wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/chaos-zhu/easynode/master/easynode-client-install-x86.sh | bash
|
||||
```
|
||||
#### ARM架构
|
||||
```shell
|
||||
待补充
|
||||
wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/chaos-zhu/easynode/master/easynode-client-install-arm.sh | bash
|
||||
```
|
||||
|
||||
> 卸载:无服务残留
|
||||
|
@ -42,8 +42,8 @@ echo "***********************创建文件PATH***********************"
|
||||
mkdir -p ${FILE_PATH}
|
||||
|
||||
echo "***********************下载开始***********************"
|
||||
DOWNLOAD_FILE_URL="https://ghproxy.com/https://github.com/chaos-zhu/easynode/releases/download/v1.0/easynode-client"
|
||||
DOWNLOAD_SERVICE_URL="https://ghproxy.com/https://raw.githubusercontent.com/chaos-zhu/easynode/v1.0/client/easynode-client.service"
|
||||
DOWNLOAD_FILE_URL="https://ghproxy.com/https://github.com/chaos-zhu/easynode/releases/download/v1.1/easynode-client-arm"
|
||||
DOWNLOAD_SERVICE_URL="https://ghproxy.com/https://raw.githubusercontent.com/chaos-zhu/easynode/v1.1/client/easynode-client.service"
|
||||
|
||||
# -O 指定路径和文件名(这里是二进制文件, 不需要扩展名)
|
||||
wget -O ${FILE_PATH}/${SERVER_NAME} --no-check-certificate --no-cache ${DOWNLOAD_FILE_URL}
|
83
easynode-client-install-x86.sh
Normal file
83
easynode-client-install-x86.sh
Normal file
@ -0,0 +1,83 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$(id -u)" != "0" ] ; then
|
||||
echo "***********************请切换到root再尝试执行***********************"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SERVER_NAME=easynode-client
|
||||
FILE_PATH=/root/local/easynode-client
|
||||
SERVICE_PATH=/etc/systemd/system
|
||||
SERVER_VERSION=v1.0
|
||||
|
||||
echo "***********************开始安装 easynode-client_${SERVER_VERSION}***********************"
|
||||
|
||||
systemctl status ${SERVER_NAME} > /dev/null 2>&1
|
||||
if [ $? != 4 ]
|
||||
then
|
||||
echo "***********************停用旧服务***********************"
|
||||
systemctl stop ${SERVER_NAME}
|
||||
systemctl disable ${SERVER_NAME}
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ -f "${SERVICE_PATH}/${SERVER_NAME}.service" ]
|
||||
then
|
||||
echo "***********************移除旧服务***********************"
|
||||
chmod 777 ${SERVICE_PATH}/${SERVER_NAME}.service
|
||||
rm -Rf ${SERVICE_PATH}/${SERVER_NAME}.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
if [ -d ${FILE_PATH} ]
|
||||
then
|
||||
echo "***********************移除旧文件***********************"
|
||||
chmod 777 ${FILE_PATH}
|
||||
rm -Rf ${FILE_PATH}
|
||||
fi
|
||||
|
||||
# 开始安装
|
||||
|
||||
echo "***********************创建文件PATH***********************"
|
||||
mkdir -p ${FILE_PATH}
|
||||
|
||||
echo "***********************下载开始***********************"
|
||||
DOWNLOAD_FILE_URL="https://ghproxy.com/https://github.com/chaos-zhu/easynode/releases/download/v1.1/easynode-client-x86"
|
||||
DOWNLOAD_SERVICE_URL="https://ghproxy.com/https://raw.githubusercontent.com/chaos-zhu/easynode/v1.1/client/easynode-client.service"
|
||||
|
||||
# -O 指定路径和文件名(这里是二进制文件, 不需要扩展名)
|
||||
wget -O ${FILE_PATH}/${SERVER_NAME} --no-check-certificate --no-cache ${DOWNLOAD_FILE_URL}
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
echo "***********************下载${SERVER_NAME}失败***********************"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wget -O ${FILE_PATH}/${SERVER_NAME}.service --no-check-certificate --no-cache ${DOWNLOAD_SERVICE_URL}
|
||||
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
echo "***********************下载${SERVER_NAME}.service失败***********************"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "***********************下载成功***********************"
|
||||
|
||||
# echo "***********************设置权限***********************"
|
||||
chmod +x ${FILE_PATH}/${SERVER_NAME}
|
||||
chmod 777 ${FILE_PATH}/${SERVER_NAME}.service
|
||||
|
||||
# echo "***********************移动service&reload***********************"
|
||||
mv ${FILE_PATH}/${SERVER_NAME}.service ${SERVICE_PATH}
|
||||
|
||||
# echo "***********************daemon-reload***********************"
|
||||
systemctl daemon-reload
|
||||
|
||||
echo "***********************启动服务***********************"
|
||||
systemctl start ${SERVER_NAME}
|
||||
|
||||
|
||||
# echo "***********************设置开机启动***********************"
|
||||
systemctl enable ${SERVER_NAME}
|
||||
|
||||
echo "***********************安装成功***********************"
|
@ -41,7 +41,7 @@ echo "pm2 version: $(pm2 -v) 安装成功"
|
||||
|
||||
echo '开始下载EasyNode'
|
||||
|
||||
DOWNLOAD_FILE_URL="https://ghproxy.com/https://github.com/chaos-zhu/easynode/releases/download/v1.0/easynode-server.zip"
|
||||
DOWNLOAD_FILE_URL="https://ghproxy.com/https://github.com/chaos-zhu/easynode/releases/download/v1.1/easynode-server.zip"
|
||||
SERVER_NAME=easynode-server
|
||||
SERVER_ZIP=easynode-server.zip
|
||||
FILE_PATH=/root
|
||||
|
Loading…
x
Reference in New Issue
Block a user