pull/632/head
Mr Chen 5 months ago
parent 404a38d990
commit 6088386e51
  1. 10
      panel_tools.py
  2. 5
      scripts/init.d/mw.tpl

@ -274,7 +274,8 @@ def getServerIp():
# "curl --insecure -{} -sS --connect-timeout 5 -m 60 https://v6r.ipip.net/?format=text".format(version))
ip = mw.execShell(
"curl --insecure -{} -sS --connect-timeout 5 -m 60 https://ip.cachecha.com/?format=text".format(version))
print(ip[0])
# print(ip[0])
return ip[0]
def getPanelSslType():
@ -284,6 +285,9 @@ def getPanelSslType():
scheme = 'https'
return scheme
def getPanelBindDomain():
return thisdb.getOption('panel_domain', default='')
def main():
if len(sys.argv) == 1:
@ -304,9 +308,11 @@ def main():
elif method == 'admin_path':
show_panel_adminpath()
elif method == 'getServerIp':
getServerIp()
print(getServerIp())
elif method == 'panel_ssl_type':
print(getPanelSslType())
elif method == 'panel_bind_domain':
print(getPanelBindDomain())
elif method == "cli":
clinum = 0
try:

@ -534,9 +534,8 @@ mw_default(){
password=$(cat ${PANEL_DIR}/data/default.pl)
if [ -f ${PANEL_DIR}/data/domain.conf ];then
address=$(cat ${PANEL_DIR}/data/domain.conf)
fi
panel_bind_domain=$(python3 ${PANEL_DIR}/panel_tools.py panel_bind_domain)
print(panel_bind_domain)
admin_path=$(cd ${PANEL_DIR} && python3 ${PANEL_DIR}/panel_tools.py admin_path)
if [ "$address" == "" ];then

Loading…
Cancel
Save