update.py should only be used as pandora user

This commit is contained in:
j 2019-12-19 20:54:37 +02:00
parent 24211e47db
commit 3e46dc78cb
1 changed files with 3 additions and 0 deletions

View File

@ -127,6 +127,9 @@ def get_branch(path=None):
if __name__ == "__main__":
if os.stat(__file__).st_uid != os.getuid() or os.getuid() == 0:
print('you must run update.py as the pandora user')
sys.exit(1)
base = os.path.normpath(os.path.abspath(os.path.dirname(__file__)))
os.chdir(base)
activate_venv(base)