匹配仓库中的文件完成载
This commit is contained in:
88
README.md
88
README.md
@@ -1,24 +1,17 @@
|
|||||||
# vps
|
## vps
|
||||||
vps脚本
|
vps脚本
|
||||||
|
|
||||||
## 初始化脚本 (init)
|
- sysUpdate
|
||||||
|
|
||||||
- 00-disable-password
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/init/00-disable-password.sh && chmod +x 00-disable-password.sh && ./00-disable-password.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 01-sysUpdate
|
|
||||||
```sh
|
```sh
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/init/01-sysUpdate.sh && chmod +x 01-sysUpdate.sh && ./01-sysUpdate.sh
|
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/init/01-sysUpdate.sh && chmod +x 01-sysUpdate.sh && ./01-sysUpdate.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
- 02-sysCleanup
|
- sysCleanup
|
||||||
```sh
|
```sh
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/init/02-sysCleanup.sh && chmod +x 02-sysCleanup.sh && ./02-sysCleanup.sh
|
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/init/02-sysCleanup.sh && chmod +x 02-sysCleanup.sh && ./02-sysCleanup.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
- 03-docker
|
- docker
|
||||||
```sh
|
```sh
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/init/03-docker.sh && chmod +x 03-docker.sh && ./03-docker.sh
|
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/init/03-docker.sh && chmod +x 03-docker.sh && ./03-docker.sh
|
||||||
```
|
```
|
||||||
@@ -38,74 +31,7 @@ curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/init/vps_init.sh &
|
|||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/init/xray-manager.sh && chmod +x xray-manager.sh && ./xray-manager.sh
|
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/init/xray-manager.sh && chmod +x xray-manager.sh && ./xray-manager.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## 安装脚本 (install)
|
- v2raya
|
||||||
|
```sh
|
||||||
- 01-Nginx
|
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/v2raya/v2raya.sh && chmod +x v2raya.sh && ./v2raya.sh
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/01-Nginx.sh && chmod +x 01-Nginx.sh && ./01-Nginx.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 02-NginxProxy
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/02-NginxProxy.sh && chmod +x 02-NginxProxy.sh && ./02-NginxProxy.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 03-X-UI
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/03-X-UI.sh && chmod +x 03-X-UI.sh && ./03-X-UI.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 04-FRP
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/04-FRP.sh && chmod +x 04-FRP.sh && ./04-FRP.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 05-ZeroTier
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/05-ZeroTier.sh && chmod +x 05-ZeroTier.sh && ./05-ZeroTier.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 06-Rustdesk
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/06-Rustdesk.sh && chmod +x 06-Rustdesk.sh && ./06-Rustdesk.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 07-Alist
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/07-Alist.sh && chmod +x 07-Alist.sh && ./07-Alist.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 08-Duplicati
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/08-Duplicati.sh && chmod +x 08-Duplicati.sh && ./08-Duplicati.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 09-Syncthing
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/09-Syncthing.sh && chmod +x 09-Syncthing.sh && ./09-Syncthing.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 10-Vaultwarden
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/10-Vaultwarden.sh && chmod +x 10-Vaultwarden.sh && ./10-Vaultwarden.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 11-EasyImage
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/11-EasyImage.sh && chmod +x 11-EasyImage.sh && ./11-EasyImage.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 12-Wordpress
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/12-Wordpress.sh && chmod +x 12-Wordpress.sh && ./12-Wordpress.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 13-Nextcloud
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/13-Nextcloud.sh && chmod +x 13-Nextcloud.sh && ./13-Nextcloud.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
- 14-Joplin
|
|
||||||
```sh
|
|
||||||
curl -sS -O https://gitea.tohub.top/Share/vps/raw/branch/main/install/14-Joplin.sh && chmod +x 14-Joplin.sh && ./14-Joplin.sh
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -59,6 +59,16 @@ detect_arch() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 转换架构名称(用于 V2rayA 文件命名)
|
||||||
|
get_v2raya_arch() {
|
||||||
|
local arch=$1
|
||||||
|
if [[ "$arch" == "amd64" ]]; then
|
||||||
|
echo "x64"
|
||||||
|
else
|
||||||
|
echo "$arch"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# 创建安装目录
|
# 创建安装目录
|
||||||
create_install_dir() {
|
create_install_dir() {
|
||||||
if [[ ! -d "$INSTALL_DIR" ]]; then
|
if [[ ! -d "$INSTALL_DIR" ]]; then
|
||||||
@@ -106,12 +116,13 @@ download_file() {
|
|||||||
# 下载安装包
|
# 下载安装包
|
||||||
download_packages() {
|
download_packages() {
|
||||||
local arch=$(detect_arch)
|
local arch=$(detect_arch)
|
||||||
|
local v2raya_arch=$(get_v2raya_arch "$arch")
|
||||||
print_info "检测到系统架构: $arch"
|
print_info "检测到系统架构: $arch"
|
||||||
|
|
||||||
create_install_dir
|
create_install_dir
|
||||||
|
|
||||||
local xray_file="xray_${XRAY_VERSION}_${arch}.deb"
|
local xray_file="xray_${XRAY_VERSION}_${arch}.deb"
|
||||||
local v2raya_file="v2raya_${V2RAYA_VERSION}_${arch}.deb"
|
local v2raya_file="v2raya_${v2raya_arch}_${V2RAYA_VERSION}.deb"
|
||||||
local download_failed=0
|
local download_failed=0
|
||||||
|
|
||||||
# 下载 Xray
|
# 下载 Xray
|
||||||
@@ -174,8 +185,9 @@ verify_deb_file() {
|
|||||||
# 安装 V2rayA
|
# 安装 V2rayA
|
||||||
install_v2raya() {
|
install_v2raya() {
|
||||||
local arch=$(detect_arch)
|
local arch=$(detect_arch)
|
||||||
|
local v2raya_arch=$(get_v2raya_arch "$arch")
|
||||||
local xray_file="$INSTALL_DIR/xray_${XRAY_VERSION}_${arch}.deb"
|
local xray_file="$INSTALL_DIR/xray_${XRAY_VERSION}_${arch}.deb"
|
||||||
local v2raya_file="$INSTALL_DIR/v2raya_${V2RAYA_VERSION}_${arch}.deb"
|
local v2raya_file="$INSTALL_DIR/v2raya_${v2raya_arch}_${V2RAYA_VERSION}.deb"
|
||||||
|
|
||||||
# 检查文件是否存在
|
# 检查文件是否存在
|
||||||
if [[ ! -f "$xray_file" ]] || [[ ! -f "$v2raya_file" ]]; then
|
if [[ ! -f "$xray_file" ]] || [[ ! -f "$v2raya_file" ]]; then
|
||||||
@@ -256,8 +268,9 @@ install_v2raya() {
|
|||||||
# 卸载 V2rayA
|
# 卸载 V2rayA
|
||||||
uninstall_v2raya() {
|
uninstall_v2raya() {
|
||||||
local arch=$(detect_arch)
|
local arch=$(detect_arch)
|
||||||
|
local v2raya_arch=$(get_v2raya_arch "$arch")
|
||||||
local xray_file="$INSTALL_DIR/xray_${XRAY_VERSION}_${arch}.deb"
|
local xray_file="$INSTALL_DIR/xray_${XRAY_VERSION}_${arch}.deb"
|
||||||
local v2raya_file="$INSTALL_DIR/v2raya_${V2RAYA_VERSION}_${arch}.deb"
|
local v2raya_file="$INSTALL_DIR/v2raya_${v2raya_arch}_${V2RAYA_VERSION}.deb"
|
||||||
|
|
||||||
print_warning "即将卸载 V2rayA 和 Xray"
|
print_warning "即将卸载 V2rayA 和 Xray"
|
||||||
read -p "是否继续?[y/N] " -n 1 -r
|
read -p "是否继续?[y/N] " -n 1 -r
|
||||||
@@ -332,8 +345,9 @@ uninstall_v2raya() {
|
|||||||
# 清理下载的安装包
|
# 清理下载的安装包
|
||||||
clean_packages() {
|
clean_packages() {
|
||||||
local arch=$(detect_arch)
|
local arch=$(detect_arch)
|
||||||
|
local v2raya_arch=$(get_v2raya_arch "$arch")
|
||||||
local xray_file="$INSTALL_DIR/xray_${XRAY_VERSION}_${arch}.deb"
|
local xray_file="$INSTALL_DIR/xray_${XRAY_VERSION}_${arch}.deb"
|
||||||
local v2raya_file="$INSTALL_DIR/v2raya_${V2RAYA_VERSION}_${arch}.deb"
|
local v2raya_file="$INSTALL_DIR/v2raya_${v2raya_arch}_${V2RAYA_VERSION}.deb"
|
||||||
local files_found=0
|
local files_found=0
|
||||||
|
|
||||||
print_warning "即将删除下载的安装包"
|
print_warning "即将删除下载的安装包"
|
||||||
@@ -384,8 +398,9 @@ clean_packages() {
|
|||||||
# 检查安装状态
|
# 检查安装状态
|
||||||
check_status() {
|
check_status() {
|
||||||
local arch=$(detect_arch)
|
local arch=$(detect_arch)
|
||||||
|
local v2raya_arch=$(get_v2raya_arch "$arch")
|
||||||
local xray_file="$INSTALL_DIR/xray_${XRAY_VERSION}_${arch}.deb"
|
local xray_file="$INSTALL_DIR/xray_${XRAY_VERSION}_${arch}.deb"
|
||||||
local v2raya_file="$INSTALL_DIR/v2raya_${V2RAYA_VERSION}_${arch}.deb"
|
local v2raya_file="$INSTALL_DIR/v2raya_${v2raya_arch}_${V2RAYA_VERSION}.deb"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
print_info "============================================"
|
print_info "============================================"
|
||||||
|
|||||||
Reference in New Issue
Block a user