commit 9f6ff02adefd818710775f0a812f9cc441291c8a Author: lsy Date: Tue Jul 23 20:50:16 2024 +0800 写好主菜单 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