From ba25df0b1cf2261e0247c025b3c2bc099f408618 Mon Sep 17 00:00:00 2001 From: Zhaofeng Yang Date: Mon, 1 Nov 2021 12:32:38 +0800 Subject: [PATCH] subprocess should be run when this if statement is true --- docker/entrypoint.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/entrypoint.py b/docker/entrypoint.py index 17cff0e..214eebd 100755 --- a/docker/entrypoint.py +++ b/docker/entrypoint.py @@ -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)