Compare commits

...

2 Commits

@ -99,10 +99,10 @@ while is_on:
else: else:
stateChanged = False stateChanged = False
# old file removal must happen after state tracking: # delete state.log so I can write to it cleanly
os.remove("/shared/state.log") os.remove("/shared/state.log")
# queue up an alert if stateChanged = True
results = [] results = []
with open("/shared/results.json", "r") as json_File: with open("/shared/results.json", "r") as json_File:
for line in json_File: for line in json_File:
@ -114,7 +114,7 @@ while is_on:
errorText = key + " returned with status " + str(value) + "\n" errorText = key + " returned with status " + str(value) + "\n"
errorFile.write(errorText) errorFile.write(errorText)
# track state # Copy current results to state.log file for next iteration
errorFile = open("/shared/state.log", "a+") errorFile = open("/shared/state.log", "a+")
errorFile.write(json_string) errorFile.write(json_string)
errorFile.write(cert_json) errorFile.write(cert_json)

@ -7,13 +7,12 @@ RUN apk update
RUN apk add \ RUN apk add \
python3 \ python3 \
python-dev \ python-dev \
py-cryptography py-cryptography \
py3-openssl
RUN python3 -m pip install --upgrade pip \ RUN python3 -m pip install --upgrade pip \
&& pip3 install requests \ && pip3 install requests \
&& pip3 install whois \ && pip3 install whois
&& pip3 install pyopenssl
COPY ./ ./ COPY ./ ./

Loading…
Cancel
Save