From 4b76c7a45020a5e741bb5936e3d601aca1fac574 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 26 Dec 2017 03:15:01 +0000 Subject: [PATCH] don't run onre than 1 of these at a time.wq --- solo-builder/tools/auto_compile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/solo-builder/tools/auto_compile.py b/solo-builder/tools/auto_compile.py index 945b3d3..303d4e8 100755 --- a/solo-builder/tools/auto_compile.py +++ b/solo-builder/tools/auto_compile.py @@ -5,6 +5,7 @@ import time import pwd import subprocess import os, pwd, grp +import os.path def get_username(): return pwd.getpwuid( os.getuid() )[ 0 ] @@ -14,6 +15,10 @@ if ( me != 'root' ) : print(" must be run as root, sorry, aborting. \n"); exit(1); +if os.path.isfile("/vagrant/progress.log"): + print "unable to run, another copy is already runniing, see /vagrant/progress.log"; + exit(1); + # open logfile: logfile = "/vagrant/progress.log" log = open(logfile, "w+")