解除域名绑定成功

pull/291/head
midoks 2 years ago
parent 10d6fa2d47
commit 6394ead5b8
  1. 8
      scripts/init.d/mw.tpl
  2. 8
      tools.py

@ -182,6 +182,13 @@ mw_open()
fi fi
} }
mw_unbind_domain()
{
if [ -f $mw_path/data/bind_domain.pl ];then
rm -rf $mw_path/data/bind_domain.pl
fi
}
error_logs() error_logs()
{ {
tail -n 100 $mw_path/logs/error.log tail -n 100 $mw_path/logs/error.log
@ -271,6 +278,7 @@ case "$1" in
'update_dev') mw_update_dev;; 'update_dev') mw_update_dev;;
'install_app') mw_install_app;; 'install_app') mw_install_app;;
'close_admin_path') mw_close_admin_path;; 'close_admin_path') mw_close_admin_path;;
'unbind_domain') mw_unbind_domain;;
'debug') mw_debug;; 'debug') mw_debug;;
'default') 'default')
cd $mw_path cd $mw_path

@ -56,6 +56,7 @@ def mwcli(mw_input=0):
print("(12) 修改面板用户名") print("(12) 修改面板用户名")
print("(13) 显示面板错误日志") print("(13) 显示面板错误日志")
print("(20) 关闭BasicAuth认证") print("(20) 关闭BasicAuth认证")
print("(21) 解除域名绑定")
print("(0) 取消") print("(0) 取消")
print(raw_tip) print(raw_tip)
try: try:
@ -65,7 +66,7 @@ def mwcli(mw_input=0):
except: except:
mw_input = 0 mw_input = 0
nums = [1, 2, 3, 4, 5, 10, 11, 12, 13, 20] nums = [1, 2, 3, 4, 5, 10, 11, 12, 13, 20, 21]
if not mw_input in nums: if not mw_input in nums:
print(raw_tip) print(raw_tip)
print("已取消!") print("已取消!")
@ -109,6 +110,11 @@ def mwcli(mw_input=0):
os.remove(basic_auth) os.remove(basic_auth)
os.system(INIT_CMD + " restart") os.system(INIT_CMD + " restart")
print("|-关闭basic_auth成功") print("|-关闭basic_auth成功")
bind_domain = 'data/bind_domain.pl'
if os.path.exists(bind_domain):
os.remove(bind_domain)
os.system(INIT_CMD + " unbind_domain")
print("|-解除域名绑定成功")
def set_panel_pwd(password, ncli=False): def set_panel_pwd(password, ncli=False):

Loading…
Cancel
Save