Fix remaining variable quoting and IP address typos

This commit is contained in:
Isshi0417 2026-07-08 05:28:46 +00:00
parent 154bad0011
commit 4a87046a9c

View File

@ -24,7 +24,7 @@
hosts = { hosts = {
"ipa": "172.30.1.100", "ipa": "172.30.1.100",
"control": "172.30.1.00", "control": "172.30.1.200",
"web": "172.30.1.201", "web": "172.30.1.201",
"media": '172.30.1.202' "media": '172.30.1.202'
} }
@ -32,7 +32,7 @@
status = {} status = {}
for name, ip in hosts.items(): for name, ip in hosts.items():
res = subprocess.run(["ping", "-c", "1", "-W", "1", "ip"], stdout=subprocess.DEVNULL) res = subprocess.run(["ping", "-c", "1", "-W", "1", ip], stdout=subprocess.DEVNULL)
status[name] = (res.returncode == 0) status[name] = (res.returncode == 0)
output_path = "/usr/share/nginx/html/status.json" output_path = "/usr/share/nginx/html/status.json"
@ -52,7 +52,7 @@
[Service] [Service]
Type=simple Type=simple
ExecStart=/bin/bash -c "While true; do /usr/bin/python3 /usr/share/nginx/html/ping_status.py; sleep 10; done" ExecStart=/bin/bash -c "while true; do /usr/bin/python3 /usr/share/nginx/html/ping_status.py; sleep 10; done"
Restart=always Restart=always
[Install] [Install]