chore(1_start.sh): invoke the common.sh componen

This commit is contained in:
sofia-riese
2026-02-01 16:18:43 +08:00
parent 1f6535c532
commit ce1295610d

View File

@@ -7,11 +7,8 @@ load_lang 1_start
# ===== 启动完成提示 ===== # ===== 启动完成提示 =====
startover() { startover() {
line_break top_box "\033[32m$START_SERVICE_OK\033[0m" \
separator_line "=" "$START_WEB_HINT \033[4;36mhttp://$host$hostdir\033[0m"
content_line "\033[32m$START_SERVICE_OK\033[0m"
content_line "$START_WEB_HINT \033[4;36mhttp://$host$hostdir\033[0m"
if [ "$firewall_area" = 4 ]; then if [ "$firewall_area" = 4 ]; then
content_line "" content_line ""
content_line "$START_PAC_HINT \033[4;32mhttp://$host:$db_port/ui/pac\033[0m" content_line "$START_PAC_HINT \033[4;32mhttp://$host:$db_port/ui/pac\033[0m"
@@ -32,17 +29,14 @@ start_core() {
fi fi
if [ ! -s "$core_config" ] && [ -s "$CRASHDIR/configs/providers.cfg" ]; then if [ ! -s "$core_config" ] && [ -s "$CRASHDIR/configs/providers.cfg" ]; then
if [ "$crashcore" = singboxr ];then if [ "$crashcore" = singboxr ]; then
CORE_TYPE=singbox CORE_TYPE=singbox
else else
CORE_TYPE=clash CORE_TYPE=clash
fi fi
. "$CRASHDIR/menus/providers_$CORE_TYPE.sh" && gen_providers . "$CRASHDIR/menus/providers_$CORE_TYPE.sh" && gen_providers
line_break comp_box "\033[33m$START_NO_CORE_CFG_TRY_GEN\033[0m"
separator_line "="
content_line "\033[33m$START_NO_CORE_CFG_TRY_GEN\033[0m"
separator_line "="
elif [ -s "$core_config" ] || [ -n "$Url" ] || [ -n "$Https" ]; then elif [ -s "$core_config" ] || [ -n "$Url" ] || [ -n "$Https" ]; then
"$CRASHDIR/start.sh" start "$CRASHDIR/start.sh" start
@@ -57,10 +51,7 @@ start_core() {
startover startover
} }
else else
line_break comp_box "\033[31m$START_NO_CORE_CFG_IMPORT_FIRST\033[0m"
separator_line "="
content_line "\033[31m$START_NO_CORE_CFG_IMPORT_FIRST\033[0m"
separator_line "="
. "$CRASHDIR/menus/6_core_config.sh" && set_core_config . "$CRASHDIR/menus/6_core_config.sh" && set_core_config
fi fi
} }
@@ -69,10 +60,7 @@ start_core() {
start_service() { start_service() {
if [ "$firewall_area" = 5 ]; then if [ "$firewall_area" = 5 ]; then
"$CRASHDIR/start.sh" start "$CRASHDIR/start.sh" start
line_break comp_box "\033[32m$START_FIREWALL_DONE\033[0m"
separator_line "="
content_line "\033[32m$START_FIREWALL_DONE\033[0m"
separator_line "="
line_break line_break
else else
start_core start_core