|
|
@ -277,6 +277,14 @@ def getServerIp(): |
|
|
|
print(ip[0]) |
|
|
|
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(): |
|
|
|
def main(): |
|
|
|
if len(sys.argv) == 1: |
|
|
|
if len(sys.argv) == 1: |
|
|
|
print('ERROR: Parameter error!') |
|
|
|
print('ERROR: Parameter error!') |
|
|
@ -297,6 +305,8 @@ def main(): |
|
|
|
show_panel_adminpath() |
|
|
|
show_panel_adminpath() |
|
|
|
elif method == 'getServerIp': |
|
|
|
elif method == 'getServerIp': |
|
|
|
getServerIp() |
|
|
|
getServerIp() |
|
|
|
|
|
|
|
elif method == 'panel_ssl_type': |
|
|
|
|
|
|
|
print(getPanelSslType()) |
|
|
|
elif method == "cli": |
|
|
|
elif method == "cli": |
|
|
|
clinum = 0 |
|
|
|
clinum = 0 |
|
|
|
try: |
|
|
|
try: |
|
|
|