From d09d17165cf7e05215c932f3d11ea39540e2e4b8 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Tue, 15 Jan 2019 15:34:40 +0800 Subject: [PATCH] Update mw.tpl --- scripts/init.d/mw.tpl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index d7de0ace0..10b5923f3 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -132,4 +132,28 @@ case "$1" in mw_start;; 'status') mw_status;; 'logs') error_logs;; + 'default') + cd $mw_path + port=$(cat $mw_path/data/port.pl) + password=$(cat $mw_path/data/default.pl) + if [ -f $mw_path/data/domain.conf ];then + address=$(cat $mw_path/data/domain.conf) + fi + 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://www.bt.cn/Api/getIpAddress) + fi + echo -e "==================================================================" + echo -e "\033[32mMW-Panel default info!\033[0m" + echo -e "==================================================================" + echo "MW-Panel-URL: http://$address:$port$auth_path" + echo -e `python $mw_path/tools.py username` + echo -e "password: $password" + echo -e "\033[33mWarning:\033[0m" + echo -e "\033[33mIf you cannot access the panel, \033[0m" + echo -e "\033[33mrelease the following port (8888|888|80|443|20|21) in the security group\033[0m" + echo -e "==================================================================" + ;; esac \ No newline at end of file