diff options
author | ms <ms@taler.net> | 2021-05-25 22:51:33 +0200 |
---|---|---|
committer | ms <ms@taler.net> | 2021-05-25 22:51:33 +0200 |
commit | 4c6ad088237c3f3b13b541bb7a5fcf17351591ad (patch) | |
tree | 08ded8e35844912a82d346b254c0c888f576ffef | |
parent | 4be267c368388ae296773c8b462e26790746f321 (diff) | |
download | deployment-4c6ad088237c3f3b13b541bb7a5fcf17351591ad.tar.gz deployment-4c6ad088237c3f3b13b541bb7a5fcf17351591ad.tar.bz2 deployment-4c6ad088237c3f3b13b541bb7a5fcf17351591ad.zip |
fix condition check
-rwxr-xr-x | bin/taler-deployment-config-instances | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/taler-deployment-config-instances b/bin/taler-deployment-config-instances index c79eda5..40a17cb 100755 --- a/bin/taler-deployment-config-instances +++ b/bin/taler-deployment-config-instances @@ -15,6 +15,7 @@ from urllib.parse import urljoin from subprocess import Popen from time import sleep import psutil +import getpass def expect_env(name): val = environ.get(name) @@ -79,11 +80,12 @@ def ensure_default_instance(): # Wait that merchant actually terminated. still_running = True while still_running: + still_running = False for proc in psutil.process_iter(): - if proc.name() == "taler-merchant-httpd": + if proc.name() == "taler-merchant-httpd" and proc.username == getuser(): + still_running = True sleep(1) break - still_running = False env_with_token = environ.copy() env_with_token["TALER_MERCHANT_TOKEN"] = TALER_ENV_FRONTENDS_APITOKEN merchant = Popen(["taler-merchant-httpd"], env=env_with_token) |