learn-spider/bin/auto_install.sh

44 lines
1.7 KiB
Bash

#!/bin/bash
#wget -O- -q --show-progress https://git.nps.crabapples.cn/crabapples/learn-spider/raw/branch/main/bin/auto_install.sh | bash
# wget -q --show-progress https://git.nps.crabapples.cn/crabapples/learn-spider/raw/branch/main/bin/close_vnc.sh && chmod +x close_vnc.sh
GIT_DOMAIN=https://git.nps.crabapples.cn
echo "清理旧脚本..."
rm -rf ./install.sh ./start_vnc_server.sh ./close_vnc_server.sh ./start_spider.sh ./update.sh ./uninstall.sh
echo "开始下载..."
echo "下载安装脚本..."
wget -q --show-progress $GIT_DOMAIN/crabapples/learn-spider/raw/branch/main/bin/install.sh && chmod +x install.sh
echo "下载启动VNC脚本..."
wget -q --show-progress $GIT_DOMAIN/crabapples/learn-spider/raw/branch/main/bin/start_vnc_server.sh && chmod +x start_vnc_server.sh
echo "下载关闭VNC脚本..."
wget -q --show-progress $GIT_DOMAIN/crabapples/learn-spider/raw/branch/main/bin/close_vnc_server.sh && chmod +x close_vnc_server.sh
echo "下载启动爬虫脚本..."
wget -q --show-progress $GIT_DOMAIN/crabapples/learn-spider/raw/branch/main/bin/start_spider.sh && chmod +x start_spider.sh
echo "下载更新脚本..."
wget -q --show-progress $GIT_DOMAIN/crabapples/learn-spider/raw/branch/main/bin/update.sh && chmod +x update.sh
echo "下载卸载脚本..."
wget -q --show-progress $GIT_DOMAIN/crabapples/learn-spider/raw/branch/main/bin/uninstall.sh && chmod +x uninstall.sh
echo "下载完成"
echo "开始安装..."
USER_COUNT=10
# 公共的工作目录
PUBLIC_DIR="/shared"
# git仓库加速地址
GIT_NO_VNC="$GIT_DOMAIN/crabapples/noVNC.git"
GIT_WEBSOCKIFY="$GIT_DOMAIN/crabapples/websockify.git"
GIT_PY_SPIDER="$GIT_DOMAIN/crabapples/learn-spider.git"
./install.sh $USER_COUNT $PUBLIC_DIR $GIT_NO_VNC $GIT_WEBSOCKIFY $GIT_PY_SPIDER
echo "安装完成"