diff --git a/compile_server/app/safe_run.py b/compile_server/app/safe_run.py index 6165680..2df74b3 100644 --- a/compile_server/app/safe_run.py +++ b/compile_server/app/safe_run.py @@ -57,4 +57,9 @@ if __name__ == '__main__': # Do not perform any sanity checking on args - this is not meant to # be launched interactively main = sys.argv[1] + + # lxc commands require a HOME - but this might not be set by nginx: + # do this here in this case + if "HOME" not in os.environ: + os.environ["HOME"] = "/home/compile_server" safe_run(main)