移除对 Bash 安装的检查,简化脚本逻辑
This commit is contained in:
parent
641f212400
commit
962243851c
@ -11,9 +11,6 @@ run() {
|
||||
# 检查jq是否安装
|
||||
check_jq
|
||||
|
||||
# 检查bash是否安装
|
||||
check_bash_installed
|
||||
|
||||
# 如果容器已经启动, 则先停止容器
|
||||
local compose_file="$script_dir/../docker-compose.yml"
|
||||
if docker-compose -f "$compose_file" ps | grep -q "Up"; then
|
||||
|
||||
@ -119,14 +119,7 @@ url_encode() {
|
||||
echo "$encoded"
|
||||
}
|
||||
|
||||
# 检查 Bash 是否已安装
|
||||
check_bash_installed() {
|
||||
if ! command -v bash &> /dev/null; then
|
||||
echo "错误: Bash 未安装!"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# 检查tuic配置文件
|
||||
check_config_file(){
|
||||
local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../" # 脚本文件夹绝对路径
|
||||
local config_file="$script_dir/../config/config.json"
|
||||
|
||||
@ -34,9 +34,6 @@ main(){
|
||||
local script_dir="$(cd "$(dirname "$0")"; pwd)/bin" # 脚本所在目录
|
||||
source "${script_dir}/utils/base.sh"
|
||||
|
||||
# 检查bash环境是否安装
|
||||
check_bash_installed
|
||||
|
||||
# 显示菜单
|
||||
echo "请选择一个操作:"
|
||||
echo "1. 一键部署"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user