From 9f6ff02adefd818710775f0a812f9cc441291c8a Mon Sep 17 00:00:00 2001 From: lsy Date: Tue, 23 Jul 2024 20:50:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=99=E5=A5=BD=E4=B8=BB=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Docker/Alist.sh | 2 ++ Config/Docker/Gitea.sh | 0 Config/Docker/Nginx-proxy-manager.sh | 0 Config/Docker/Safeline.sh | 0 Config/Docker/Siyuan.sh | 0 Config/Docker/Typecho.sh | 0 Menus/Automation.sh | 0 Menus/Debian.sh | 0 Menus/Docker.sh | 38 ++++++++++++++++++++++++++++ Menus/Login.sh | 10 ++++++++ Run.sh | 28 ++++++++++++++++++++ 11 files changed, 78 insertions(+) create mode 100644 Config/Docker/Alist.sh create mode 100644 Config/Docker/Gitea.sh create mode 100644 Config/Docker/Nginx-proxy-manager.sh create mode 100644 Config/Docker/Safeline.sh create mode 100644 Config/Docker/Siyuan.sh create mode 100644 Config/Docker/Typecho.sh create mode 100644 Menus/Automation.sh create mode 100644 Menus/Debian.sh create mode 100644 Menus/Docker.sh create mode 100644 Menus/Login.sh create mode 100644 Run.sh diff --git a/Config/Docker/Alist.sh b/Config/Docker/Alist.sh new file mode 100644 index 0000000..fb48810 --- /dev/null +++ b/Config/Docker/Alist.sh @@ -0,0 +1,2 @@ +#!/bin/bash +echo "alist" \ No newline at end of file diff --git a/Config/Docker/Gitea.sh b/Config/Docker/Gitea.sh new file mode 100644 index 0000000..e69de29 diff --git a/Config/Docker/Nginx-proxy-manager.sh b/Config/Docker/Nginx-proxy-manager.sh new file mode 100644 index 0000000..e69de29 diff --git a/Config/Docker/Safeline.sh b/Config/Docker/Safeline.sh new file mode 100644 index 0000000..e69de29 diff --git a/Config/Docker/Siyuan.sh b/Config/Docker/Siyuan.sh new file mode 100644 index 0000000..e69de29 diff --git a/Config/Docker/Typecho.sh b/Config/Docker/Typecho.sh new file mode 100644 index 0000000..e69de29 diff --git a/Menus/Automation.sh b/Menus/Automation.sh new file mode 100644 index 0000000..e69de29 diff --git a/Menus/Debian.sh b/Menus/Debian.sh new file mode 100644 index 0000000..e69de29 diff --git a/Menus/Docker.sh b/Menus/Docker.sh new file mode 100644 index 0000000..43558ae --- /dev/null +++ b/Menus/Docker.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +if ! command -v docker &> /dev/null; then + echo "docker未安装" + bash Run.sh +fi + +declare pick_array +declare pick_number=6 +declare pick + +echo "========Docker========" +echo "0.返回主菜单" +echo "1.换源" +echo "-----一键搭建软件-----" +cd "Config/Docker" +for i in *;do + pick_number=$((pick_number + 1)) + pick_array[$pick_number]=$(awk -F '.' '{print $1}' <<< "$i") + echo "${pick_number}.${pick_array[$pick_number]}" +done +cd - >> /dev/null +echo "-----一键搭建软件-----" +echo "========Docker========" +read -p "请输入要使用的功能:" pick + + +if [[ "$pick" == 0 ]]; then + clear + bash Run.sh +elif [[ "${pick_number}" -gt 0 && "${pick}" -le "$((${#pick_array[*]}+${pick_number}))" ]];then + clear + bash "Config/Docker/${pick_array[${pick}]}.sh" +else + exit +fi + + diff --git a/Menus/Login.sh b/Menus/Login.sh new file mode 100644 index 0000000..e0075f3 --- /dev/null +++ b/Menus/Login.sh @@ -0,0 +1,10 @@ +#!bin/bash +echo "========Login========" +echo "0.返回主菜单" +echo "1.修改root密码" +echo "2.新建用户" +echo "3.安装密钥" +echo "4.管理ssh登录方式" +echo "5.更换ssh端口" +echo "6.ssh二次验证" +echo "========Login========" \ No newline at end of file diff --git a/Run.sh b/Run.sh new file mode 100644 index 0000000..b66233d --- /dev/null +++ b/Run.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +if ! command -v sudo &> /dev/null; then + echo "sudo未安装,部分命令无法正常运行" +fi + + +declare -a pick_array +declare pick_number=0 + +declare pick +echo "======Linux工具箱======" +cd Menus +for i in * +do + pick_number=$((pick_number + 1)) + pick_array[$pick_number]=$(awk -F '.' '{print $1}' <<< "$i") + echo "${pick_number}.${pick_array[$pick_number]}" +done +cd - >> /dev/null +echo "======Linux工具箱======" +read -p "请输入要使用的功能:" pick +if [[ "${pick}" -gt 0 && "${pick}" -le "${#pick_array[*]}" ]];then + clear + bash Menus/${pick_array[$pick]}.sh +else + exit +fi \ No newline at end of file