增加检查配置文件
This commit is contained in:
parent
8421475b36
commit
58268e16ed
@ -8,6 +8,13 @@ print_share_link() {
|
|||||||
# 检查jq是否安装
|
# 检查jq是否安装
|
||||||
check_jq
|
check_jq
|
||||||
|
|
||||||
|
# 检查配置文件是否存在
|
||||||
|
if [ ! -f "$config_dir/config.json" ]; then
|
||||||
|
red "error: 配置文件未生成, 查看配置失败"
|
||||||
|
echo '请选择"生成配置 / 重置配置"'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# 检查是否已启动过容器
|
# 检查是否已启动过容器
|
||||||
local password=$(jq -r '.auth.password' "$config_dir/config.json")
|
local password=$(jq -r '.auth.password' "$config_dir/config.json")
|
||||||
if [ "$password" = "你的密码" ]; then
|
if [ "$password" = "你的密码" ]; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user