From 89750c97e75c731b0996b3dd47b9195ac384a8c3 Mon Sep 17 00:00:00 2001 From: faulty Date: Sun, 18 Dec 2022 23:46:56 +0100 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'))