Skip to content

Commit

Permalink
Remove useless Functions
Browse files Browse the repository at this point in the history
  • Loading branch information
twnesss committed Dec 2, 2023
1 parent 0f1b839 commit e801aff
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions box/scripts/box.service
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ prepare_clash() {
log Error "configuration file ${clash_config} not found"
exit 1
else
temp_clash_config_file
log Info "config ${clash_config}"
fi

Expand Down Expand Up @@ -300,21 +299,6 @@ prepare_clash() {
fi
}

temp_clash_config_file() {
clash_template="${box_dir}/clash/template"
temp_clash_config_file="${clash_config}"

if [ -f "${clash_template}" ]; then
log debug "use template configuration"
cp -f "${clash_template}" "${temp_clash_config_file}.temp" && echo "\n" >> "${temp_clash_config_file}.temp"
sed -n -E '/^proxies:$/,$p' "${clash_config}" >> "${temp_clash_config_file}.temp"
sed -i '/^[[:space:]]*$/d' "${temp_clash_config_file}.temp"
if mv "${temp_clash_config_file}.temp" "${clash_config}"; then
log Info "The merging of the $clash_config and $clash_template files is complete."
fi
fi
}

box_run_bin() {
log Info "client-list: [ ${bin_list[*]} ]"
log Info "choose: ${bin_name}, start the service."
Expand Down

0 comments on commit e801aff

Please sign in to comment.