fix: resolve node remarks printed as default prefix upon initial node creation
Main / build (push) Waiting to run
Main / build (push) Waiting to run
This commit is contained in:
+6
-2
@@ -521,9 +521,10 @@ create() {
|
||||
[[ $is_config_file ]] && is_no_del_msg=1 && del $is_config_file
|
||||
# save json to file
|
||||
if [[ $is_remarks ]]; then
|
||||
echo -e "// remarks: $is_remarks\n$(cat <<<$is_new_json)" >$is_json_file
|
||||
echo "// remarks: $is_remarks" >$is_json_file
|
||||
echo "$is_new_json" >>$is_json_file
|
||||
else
|
||||
cat <<<$is_new_json >$is_json_file
|
||||
echo "$is_new_json" >$is_json_file
|
||||
fi
|
||||
if [[ ! -f $is_config_json ]]; then
|
||||
# config.json
|
||||
@@ -1587,11 +1588,14 @@ info() {
|
||||
local custom_remarks=""
|
||||
if [[ $is_config_file ]]; then
|
||||
custom_remarks=$(grep -E '^[[:space:]]*//[[:space:]]*remarks:' $is_conf_dir/"$is_config_file" | sed 's/.*remarks:[[:space:]]*//')
|
||||
elif [[ -f $is_json_file ]]; then
|
||||
custom_remarks=$(grep -E '^[[:space:]]*//[[:space:]]*remarks:' $is_json_file | sed 's/.*remarks:[[:space:]]*//')
|
||||
fi
|
||||
local url_remarks="sb-$net-$is_addr"
|
||||
[[ $host ]] && url_remarks="sb-$net-$host"
|
||||
[[ $is_anytls_domain ]] && url_remarks="sb-$net-$is_anytls_domain"
|
||||
[[ $custom_remarks ]] && url_remarks=$custom_remarks
|
||||
[[ $is_remarks ]] && url_remarks=$is_remarks
|
||||
|
||||
# is_color=$(shuf -i 41-45 -n1)
|
||||
is_color=44
|
||||
|
||||
Reference in New Issue
Block a user