Compare commits

..

1 Commits

Author SHA1 Message Date
f1777d2d19 Merge pull request 'work' (#1) from work into main
Reviewed-on: #1
2024-11-26 12:59:21 -06:00
2 changed files with 6 additions and 4 deletions

View File

@@ -1,9 +1,11 @@
FROM debian:trixie-slim
FROM debian:bullseye-slim
#
RUN apt update && apt install python3 python3-pip iputils-ping -y
COPY logpingresult.py /usr/local/bin/
COPY requirements.txt /
COPY init.sh /
RUN chmod +x /init.sh
RUN apt update && apt install python3 python3-pip iputils-ping -y && pip3 install -r /requirements.txt --break-system-packages && apt clean
COPY logpingresult.py /usr/local/bin/
RUN chmod +x /usr/local/bin/logpingresult.py
RUN pip3 install -r /requirements.txt
RUN apt clean
CMD ["/init.sh"]

View File

@@ -26,7 +26,7 @@ while(True):
response = sp.getstatusoutput(f"ping -c 1 {ip}")
print(response)
if(response[0]!=0):
myresp=2000
time=2000
else:
myresp = response[1].split("\n")[1].split(' ')[6].split('=')[1]