X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=config%2Fsfa-config-tty;h=252c77d522603316f68975e300dd33397caca4a7;hb=2d2a85edf02c635b592dfdb52c92dfa97b845f68;hp=5377d46a6d36a10dada5839dd2419ff9d54e04c6;hpb=8e558be62ca1e048cedb76d6036d1acbfa827bd4;p=sfa.git diff --git a/config/sfa-config-tty b/config/sfa-config-tty index 5377d46a..252c77d5 100755 --- a/config/sfa-config-tty +++ b/config/sfa-config-tty @@ -223,18 +223,19 @@ 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) ####################