summaryrefslogtreecommitdiff
path: root/bin/taler-deployment-config-instances
diff options
context:
space:
mode:
authorMS <ms@taler.net>2021-05-25 14:11:24 +0200
committerMS <ms@taler.net>2021-05-25 14:11:24 +0200
commit5b035f7d89005c089f79418ef09f9dbc4ce9095e (patch)
treeaeb5104ceb9dd1730e23e45f6df163236b41826d /bin/taler-deployment-config-instances
parentcc97757958a6c4dfafdedd0f4f742e7f9001cd94 (diff)
downloaddeployment-5b035f7d89005c089f79418ef09f9dbc4ce9095e.tar.gz
deployment-5b035f7d89005c089f79418ef09f9dbc4ce9095e.tar.bz2
deployment-5b035f7d89005c089f79418ef09f9dbc4ce9095e.zip
Wait merchant to terminate
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)