update
This commit is contained in:
parent
91e3900d12
commit
404a38d990
|
|
@ -277,6 +277,14 @@ def getServerIp():
|
|||
print(ip[0])
|
||||
|
||||
|
||||
def getPanelSslType():
|
||||
scheme = 'http'
|
||||
panel_ssl = thisdb.getOptionByJson('panel_ssl', default={'open':False})
|
||||
if panel_ssl['open']:
|
||||
scheme = 'https'
|
||||
return scheme
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) == 1:
|
||||
print('ERROR: Parameter error!')
|
||||
|
|
@ -297,6 +305,8 @@ def main():
|
|||
show_panel_adminpath()
|
||||
elif method == 'getServerIp':
|
||||
getServerIp()
|
||||
elif method == 'panel_ssl_type':
|
||||
print(getPanelSslType())
|
||||
elif method == "cli":
|
||||
clinum = 0
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -521,11 +521,7 @@ mw_clean_lib(){
|
|||
mw_default(){
|
||||
cd ${PANEL_DIR}
|
||||
port=7200
|
||||
scheme=http
|
||||
|
||||
if [ -f ${PANEL_DIR}/ssl/choose.pl ];then
|
||||
scheme=https
|
||||
fi
|
||||
scheme=$(python3 ${PANEL_DIR}/panel_tools.py panel_ssl_type)
|
||||
|
||||
if [ -f ${PANEL_DIR}/data/port.pl ];then
|
||||
port=$(cat ${PANEL_DIR}/data/port.pl)
|
||||
|
|
|
|||
Loading…
Reference in New Issue