X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=config%2Fsfa-config-tty;h=029cfa1283b375222bcb679fa498897f7ad272a2;hb=e4aafa7da681902d0c937b769830c302d38f8815;hp=5377d46a6d36a10dada5839dd2419ff9d54e04c6;hpb=04a3f20dc71bf8b3f96b1e3172623aa346a638a7;p=sfa.git diff --git a/config/sfa-config-tty b/config/sfa-config-tty index 5377d46a..029cfa12 100755 --- a/config/sfa-config-tty +++ b/config/sfa-config-tty @@ -28,15 +28,11 @@ usual_variables = [ "SFA_REGISTRY_ROOT_AUTH", "SFA_REGISTRY_HOST", "SFA_AGGREGATE_HOST", - "SFA_SM_HOST", "SFA_DB_HOST", ] flavour_xml_section_hash = { 'pl': 'sfa_plc', - 'openstack': 'sfa_nova', - 'fd': 'sfa_federica', - 'nitos': 'sfa_nitos', 'dummy': 'sfa_dummy', } configuration = { @@ -223,18 +219,20 @@ def consolidate(default_config, site_config, consolidated_config): def reload_service(): - global service - os.system("set -x ; service %s reload" % service) + reload = "sfa-setup.sh reload" + print("Running: {}".format(reload)) + os.system(reload) #################### def restart_service(): - global service - print("==================== Stopping %s" % service) - os.system("service %s stop" % service) - print("==================== Starting %s" % service) - os.system("service %s start" % service) + services = ('sfa-db', 'sfa-aggregate', 'sfa-registry') + for service in services: + restart = ("systemctl -q is-active {s} && " + "{{ echo restarting {s} ; systemctl restart {s}; }}" + .format(s=service)) + os.system(restart) ####################