Compare commits
5 Commits
a81b56eaf7
...
main
Author | SHA1 | Date | |
---|---|---|---|
ce84450c64 | |||
0241f9f36c | |||
0cca15af60 | |||
eaf3e68fa0 | |||
aab45796ae |
@@ -1,11 +1,9 @@
|
|||||||
FROM debian:bullseye-slim
|
FROM debian:trixie-slim
|
||||||
#
|
#
|
||||||
COPY logpingresult.py /usr/local/bin/
|
|
||||||
COPY requirements.txt /
|
COPY requirements.txt /
|
||||||
COPY init.sh /
|
COPY init.sh /
|
||||||
RUN chmod +x /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 chmod +x /usr/local/bin/logpingresult.py
|
||||||
RUN apt update && apt install python3 python3-pip iputils-ping -y
|
|
||||||
RUN pip3 install -r /requirements.txt
|
|
||||||
RUN apt clean
|
|
||||||
CMD ["/init.sh"]
|
CMD ["/init.sh"]
|
@@ -26,7 +26,7 @@ while(True):
|
|||||||
response = sp.getstatusoutput(f"ping -c 1 {ip}")
|
response = sp.getstatusoutput(f"ping -c 1 {ip}")
|
||||||
print(response)
|
print(response)
|
||||||
if(response[0]!=0):
|
if(response[0]!=0):
|
||||||
time=2000
|
myresp=2000
|
||||||
else:
|
else:
|
||||||
myresp = response[1].split("\n")[1].split(' ')[6].split('=')[1]
|
myresp = response[1].split("\n")[1].split(' ')[6].split('=')[1]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user