Skip to content

Commit

Permalink
fix: license and gdpr issues with speedtest
Browse files Browse the repository at this point in the history
  • Loading branch information
debemdeboas committed Feb 20, 2024
1 parent fee63f1 commit f6881b0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ RUN apt install -y speedtest && rm -rf /var/lib/apt/lists/*

EXPOSE 80

# Accept the license agreements
# RUN bash -c "timeout 5 speedtest < <(echo -e 'YES\nYES')"
RUN timeout 5 speedtest --accept-license --accept-gdpr || exit 0

WORKDIR /app
COPY speedtest.py /app/

Expand Down
2 changes: 1 addition & 1 deletion speedtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def serve(server_class=http.server.HTTPServer, handler_class=Handler):

def run_speedtest():
while True:
speedtest_results = json.loads(os.popen("speedtest -fjson").read())
speedtest_results = json.loads(os.popen("speedtest --accept-license --accept-gdpr -fjson").read())

speedtest_results = {
k: v
Expand Down

0 comments on commit f6881b0

Please sign in to comment.