mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 07:30:24 +00:00
Update manage.py
This commit is contained in:
parent
e0c7f2da31
commit
ed8e6c8683
1 changed files with 2 additions and 5 deletions
|
@ -685,7 +685,7 @@ def check_real_domain(domain):
|
|||
domain_real = True
|
||||
try:
|
||||
cmd = "ping -c 1 " + domain + " | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | uniq"
|
||||
domain_ip = shell_execute.execute_command_output_all(cmd)["result"]
|
||||
domain_ip = shell_execute.execute_command_output_all(cmd)["result"].rstrip('\n')
|
||||
|
||||
ip_result = shell_execute.execute_command_output_all("cat /data/apps/stackhub/docker/w9appmanage/public_ip")
|
||||
ip_save = ip_result["result"].rstrip('\n')
|
||||
|
@ -704,15 +704,12 @@ def get_token():
|
|||
headers = {'Content-type': 'application/json'}
|
||||
cmd = "cat /usr/share/cockpit/nginx/config.json | jq -r '.NGINXPROXYMANAGER_PASSWORD'"
|
||||
password = shell_execute.execute_command_output_all(cmd)["result"].rstrip('\n')
|
||||
if password == "uub8ohr3eiP4Chi!":
|
||||
myLogger.info_logger("password: " + password)
|
||||
param = {
|
||||
"identity": "help@websoft9.com",
|
||||
"scope": "user",
|
||||
"secret": "uub8ohr3eiP4Chi!"
|
||||
"secret": password
|
||||
}
|
||||
response = requests.post(url, data=json.dumps(param), headers=headers)
|
||||
myLogger.info_logger(response.json())
|
||||
token = "Bearer " + response.json()["token"]
|
||||
return token
|
||||
|
||||
|
|
Loading…
Reference in a new issue