From ab17f173d3139578961d538eaaae54be4cf423bc Mon Sep 17 00:00:00 2001 From: Raine Date: Sat, 14 Oct 2023 22:38:06 +0200 Subject: [PATCH] allow force pulls --- lib/docker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docker.py b/lib/docker.py index 4bd925e..87967a9 100644 --- a/lib/docker.py +++ b/lib/docker.py @@ -11,7 +11,7 @@ class handler(BaseHTTPRequestHandler): self.send_response(200) self.send_header('Content-type','text/plain') self.end_headers() - if (time.time() - os.path.getmtime('./lib/deploy.sh') > 86400): + if (time.time() - os.path.getmtime('./lib/deploy.sh') > 86400) or self.path == '/pull': subprocess.call(['git', 'pull']) with open('./lib/deploy.sh') as f: self.wfile.write(bytes(f.read(), 'utf-8'))