From a33c151ed891b4728adb754a334ee810c68e1bdc Mon Sep 17 00:00:00 2001 From: xcsoft Date: Tue, 21 Jun 2022 20:17:55 +0800 Subject: [PATCH] fix --- scripts/init.d/mw.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index 437b3a662..c59f86a7f 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -185,6 +185,9 @@ case "$1" in if [ -f $mw_path/data/admin_path.pl ];then auth_path=$(cat $mw_path/data/admin_path.pl) fi + if [ "$address" = "" ];then + address=$(curl -sS --connect-timeout 10 -m 60 https://v6r.ipip.net/?format=text) + fi echo -e "==================================================================" echo -e "\033[32mMW-Panel default info!\033[0m" @@ -197,4 +200,4 @@ case "$1" in echo -e "\033[33mrelease the following port (7200|888|80|443|20|21) in the security group\033[0m" echo -e "==================================================================" ;; -esac \ No newline at end of file +esac