update
This commit is contained in:
parent
c91e4935c3
commit
90f2d5c093
@ -72,6 +72,12 @@ create_self_tls_config() {
|
||||
|
||||
create_config(){
|
||||
local script_dir=$(cd "$(dirname "$0")"; pwd)
|
||||
|
||||
# 如果配置文件不存在, 创建空白配置文件
|
||||
if [ ! -e "$script_dir/../config.json" ]; then
|
||||
touch "$script_dir/../config.json"
|
||||
fi
|
||||
|
||||
local config_password=$(jq -r '.auth.password' "$script_dir/../config.json")
|
||||
if [ -s "$script_dir/../config.json" ] && [ "$config_password" != "你的密码" ]; then
|
||||
local regenerate
|
||||
|
||||
@ -14,6 +14,9 @@ run() {
|
||||
check_bash_installed
|
||||
|
||||
# 如果配置没有创建
|
||||
if [ ! -e "$config_dir/../config.json" ]; then
|
||||
touch "$config_dir/../config.json"
|
||||
fi
|
||||
local password=$(jq -r '.auth.password' "$config_dir/config.json")
|
||||
if [ ! -s "$config_dir/config.json" ] || [ "$password" = "你的密码" ]; then
|
||||
bash "$script_dir/create_config.sh" # 创建配置
|
||||
|
||||
Loading…
Reference in New Issue
Block a user