Removed headlock(hopefully)

This commit is contained in:
Kevin Veen-Birkenbach 2023-12-15 15:27:09 +01:00
parent eda977b76e
commit 676093619f
3 changed files with 3 additions and 4 deletions

View File

@ -58,7 +58,7 @@ system_maintenance_timeout_cleanup_services: "15min"
system_maintenance_timeout_backup_services: "1h" system_maintenance_timeout_backup_services: "1h"
system_maintenance_timeout_heal_docker: "30min" system_maintenance_timeout_heal_docker: "30min"
system_maintenance_timeout_update_docker: "5min" system_maintenance_timeout_update_docker: "5min"
system_maintenance_timeout_defroster: "2min" system_maintenance_timeout_freezer_action: "2min"
## Services ## Services

View File

@ -179,7 +179,7 @@ if __name__ == "__main__":
parser.add_argument('action', choices=['freeze', 'defrost'], help='Action to perform: freeze or defrost services.') parser.add_argument('action', choices=['freeze', 'defrost'], help='Action to perform: freeze or defrost services.')
parser.add_argument('services', nargs='+', help='List of services to apply the action to.') parser.add_argument('services', nargs='+', help='List of services to apply the action to.')
parser.add_argument('--ignore', nargs='*', help='List of services to ignore in the action.', default=[]) parser.add_argument('--ignore', nargs='*', help='List of services to ignore in the action.', default=[])
parser.add_argument('--timeout', help='Timeout for freezing services (e.g., 1h, 30min, 45s).', default='1h') parser.add_argument('--timeout', help='Timeout for freezer actions (e.g., 1h, 30min, 45s).', default='1min')
args = parser.parse_args() args = parser.parse_args()
services = args.services services = args.services
ignored_services = args.ignore if args.ignore else [] ignored_services = args.ignore if args.ignore else []

View File

@ -4,5 +4,4 @@ OnFailure=systemd-notifier@%n.service
[Service] [Service]
Type=oneshot Type=oneshot
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_maintenance_service_freezer_script }} {{item}} {{ system_maintenance_services | join(' ') }} --timeout "{{system_maintenance_timeout_defroster}}"' ExecStart=/bin/sh -c '/usr/bin/python {{ path_system_maintenance_service_freezer_script }} {{item}} {{ system_maintenance_services | join(' ') }} --timeout "{{system_maintenance_timeout_freezer_action}}"'
ExecStart=/bin/sh -c '/usr/bin/python {{ path_system_maintenance_service_freezer_script }} {{item}} {{ system_maintenance_services | join(' ') }}'