don't run onre than 1 of these at a time.wq

This commit is contained in:
root 2017-12-26 03:15:01 +00:00
parent 4d97c620b8
commit 4b76c7a450

View File

@ -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+")