mirror of
https://github.com/Py-KMS-Organization/py-kms.git
synced 2025-05-09 14:21:56 -04:00
subprocess should be run when this if statement is true
This commit is contained in:
parent
deddf0c01c
commit
ba25df0b1c
1 changed files with 3 additions and 2 deletions
|
@ -32,8 +32,9 @@ def change_uid_grp():
|
|||
new_uid = int(os.getenv('UID', str(uid)))
|
||||
os.chown("/home/py-kms", new_uid, new_gid)
|
||||
os.chown("/usr/bin/start.py", new_uid, new_gid)
|
||||
if os.path.isfile(dbPath): os.chown(dbPath, new_uid, new_gid)
|
||||
loggersrv.debug("%s" %str(subprocess.check_output("ls -al " + dbPath, shell=True)))
|
||||
if os.path.isfile(dbPath):
|
||||
os.chown(dbPath, new_uid, new_gid)
|
||||
loggersrv.debug("%s" %str(subprocess.check_output("ls -al " + dbPath, shell=True)))
|
||||
if gid != new_gid:
|
||||
loggersrv.info("Setting gid to '%s'." % str(new_gid))
|
||||
os.setgid(gid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue