Update ping.py
This commit is contained in:
@@ -11,13 +11,13 @@ import subprocess
|
|||||||
file = "status.json"
|
file = "status.json"
|
||||||
|
|
||||||
|
|
||||||
#dictionary containing current server hostnames/ips
|
#creating dictionary containing current server hostnames/ips from json
|
||||||
|
|
||||||
servers = {
|
try:
|
||||||
"link": "1.2.3.4",
|
with open("/root/servers.json") as f:
|
||||||
"ganon": "5.6.7.8",
|
servers = json.load(f)
|
||||||
"zelda": "9.10.1.12",
|
except FileNotFoundError:
|
||||||
}
|
raise RuntimeError("servers json file not found")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user