Unverified Commit b899e467 authored by Zaid Daba'een's avatar Zaid Daba'een Committed by Tugdual Saunier

Prevent restart with no server credentials which causes exit code 1

parent a6c166d0
......@@ -31,6 +31,8 @@ template '/etc/blackfire/agent' do
service 'blackfire-agent' do
not_if { node[cookbook_name]['agent']['server_id'].to_s.empty? }
not_if { node[cookbook_name]['agent']['server_token'].to_s.empty? }
supports status: true, start: true, stop: true, restart: true
action [:enable]
subscribes :restart, 'template[/etc/blackfire/agent]', node[cookbook_name]['agent']['restart_mode']
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment