summaryrefslogtreecommitdiff
path: root/bin/taler-deployment-config-instances
diff options
context:
space:
mode:
Diffstat (limited to 'bin/taler-deployment-config-instances')
-rwxr-xr-xbin/taler-deployment-config-instances9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/taler-deployment-config-instances b/bin/taler-deployment-config-instances
index 04c2179..2d8b5a2 100755
--- a/bin/taler-deployment-config-instances
+++ b/bin/taler-deployment-config-instances
@@ -13,6 +13,7 @@ from os import environ, system
from sys import exit
from urllib.parse import urljoin
from subprocess import Popen
+import psutil
def expect_env(name):
val = environ.get(name)
@@ -74,6 +75,14 @@ def ensure_instance(instance_id, name, payto_uris, auth):
def ensure_default_instance():
system("taler-deployment-arm -k taler-merchant")
+ # Wait that merchant actually terminated.
+ still_running = True
+ while still_running:
+ for proc in psutil.process_iter():
+ if proc.name() == "taler-merchant-httpd":
+ 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)