diff --git a/app/create_db.py b/app/create_db.py index 3636276..765d986 100644 --- a/app/create_db.py +++ b/app/create_db.py @@ -978,10 +978,7 @@ def update_db_v_6_1_4(): continue if service.slug != 'haproxy' and setting == 'haproxy_enterprise': continue - if setting == 'restart': - set_value = 1 - else: - set_value = 0 + set_value = 0 try: ServiceSetting.insert( server_id=server.server_id, service=service.slug, setting=setting, value=set_value diff --git a/app/options.py b/app/options.py index 0048d76..7e8a62a 100644 --- a/app/options.py +++ b/app/options.py @@ -4409,7 +4409,7 @@ if form.getvalue('serverSettingsSave') is not None: else: funct.logging(server_ip, 'Service has been flagged as a system service', haproxywi=1, login=1, keep_history=1, service=service) - if sql.insert_or_update_service_setting(server_id, service, 'restart', nginx_dockerized): + if sql.insert_or_update_service_setting(server_id, service, 'restart', nginx_restart): print('Ok') if nginx_restart == '1': funct.logging(server_ip, 'Restart option is disabled for this service', haproxywi=1, login=1, @@ -4427,7 +4427,7 @@ if form.getvalue('serverSettingsSave') is not None: else: funct.logging(server_ip, 'Service has been flagged as a system service', haproxywi=1, login=1, keep_history=1, service=service) - if sql.insert_or_update_service_setting(server_id, service, 'restart', nginx_dockerized): + if sql.insert_or_update_service_setting(server_id, service, 'restart', apache_restart): print('Ok') if apache_restart == '1': funct.logging(server_ip, 'Restart option is disabled for this service', haproxywi=1, login=1, diff --git a/requirements.txt b/requirements.txt index 180aa1d..d95e04f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,3 +12,4 @@ peewee>=3.14.10 PyMySQL>=1.0.2 distro>=1.2.0 bottle>=0.12.18 +psutil>=5.9.1