mirror of
https://github.com/Py-KMS-Organization/py-kms.git
synced 2025-05-14 23:24:52 -04:00
Merge pull request #30 from yangzhaofeng/patch-1
subprocess should be run when this if statement is true
This commit is contained in:
commit
50f4778dd4
1 changed files with 4 additions and 2 deletions
|
@ -32,8 +32,10 @@ def change_uid_grp():
|
||||||
new_uid = int(os.getenv('UID', str(uid)))
|
new_uid = int(os.getenv('UID', str(uid)))
|
||||||
os.chown("/home/py-kms", new_uid, new_gid)
|
os.chown("/home/py-kms", new_uid, new_gid)
|
||||||
os.chown("/usr/bin/start.py", 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)
|
if os.path.isfile(dbPath):
|
||||||
|
os.chown(dbPath, new_uid, new_gid)
|
||||||
loggersrv.debug("%s" %str(subprocess.check_output("ls -al " + dbPath, shell=True)))
|
loggersrv.debug("%s" %str(subprocess.check_output("ls -al " + dbPath, shell=True)))
|
||||||
|
|
||||||
if gid != new_gid:
|
if gid != new_gid:
|
||||||
loggersrv.info("Setting gid to '%s'." % str(new_gid))
|
loggersrv.info("Setting gid to '%s'." % str(new_gid))
|
||||||
os.setgid(gid)
|
os.setgid(gid)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue