Stop containers gracefully, instead of outright killing them
This commit is contained in:
		@@ -13,7 +13,7 @@ DefaultDependencies=no
 | 
			
		||||
[Service]
 | 
			
		||||
Type=simple
 | 
			
		||||
Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
 | 
			
		||||
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-postmoogle 2>/dev/null || true'
 | 
			
		||||
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-postmoogle 2>/dev/null || true'
 | 
			
		||||
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true'
 | 
			
		||||
 | 
			
		||||
ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-bot-postmoogle \
 | 
			
		||||
@@ -36,7 +36,7 @@ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name
 | 
			
		||||
			{% endfor %}
 | 
			
		||||
			{{ matrix_bot_postmoogle_docker_image }}
 | 
			
		||||
 | 
			
		||||
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-postmoogle 2>/dev/null || true'
 | 
			
		||||
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-postmoogle 2>/dev/null || true'
 | 
			
		||||
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true'
 | 
			
		||||
Restart=always
 | 
			
		||||
RestartSec=30
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user