Skip to content

Commit

Permalink
First release
Browse files Browse the repository at this point in the history
  • Loading branch information
kladkogex committed Jun 8, 2021
1 parent 847eba0 commit 3a2ff4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 2 additions & 5 deletions endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,14 @@
exit(-5)


ABI_FILEPATH = "/etc/skale-manager-1.8.0-mainnet-abi.json"
ABI_FILEPATH = "/tmp/abi.json"

if not os.path.exists(ABI_FILEPATH):
print("Fatal error: could not find ABI. Exiting")
exit(-6)

if not os.path.exists(ABI_FILEPATH):
print("Fatal error: could not find ABI. Exiting")
exit(-6)

RESULTS_PATH = "/tmp/mainnet.json"
RESULTS_PATH = "/tmp/chains.json"

PORTS_PER_SCHAIN = 64

Expand Down
6 changes: 4 additions & 2 deletions periodic_config_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
TMP_CONFIG_FILE = "/tmp/tmp.config"
CERT_FILE = "/data/server.crt"
KEY_FILE = "/data/server.key"
RESULTS_PATH = "/tmp/mainnet.json"
RESULTS_PATH = "/tmp/chains.json"
PROXY_FULL_HOST_NAME = os.environ.get("PROXY_FULL_HOST_NAME")

if PROXY_FULL_HOST_NAME is None:
Expand Down Expand Up @@ -128,9 +128,11 @@ def main():
while True:
print("Updating chain info ...")
subprocess.check_call(["/bin/bash", "-c", "rm -f /tmp/*"])
subprocess.check_call(["/bin/bash", "-c",
"cp /etc/skale-manager-1.8.0-mainnet-abi.json /tmp/abi.json"])
subprocess.check_call(["python3", "/etc/endpoints.py"])
subprocess.check_call(["/bin/bash", "-c", "mkdir -p /usr/share/nginx/www"])
subprocess.check_call(["/bin/bash", "-c", "cp -f /tmp/mainnet.json /usr/share/nginx/www"])
subprocess.check_call(["/bin/bash", "-c", "cp -f /tmp/chains.json /usr/share/nginx/www/mainnet.json"])

if not os.path.exists(RESULTS_PATH):
print("Fatal error: Chains file does not exist. Exiting ...")
Expand Down

0 comments on commit 3a2ff4c

Please sign in to comment.