When chef-client is terminated with SIGTERM it unhelpfully
returns an exit status of 3 which, by default, is treated as
an unsuccessful exit.
description "Chef client"
after "network.target"
exec_start "/usr/bin/chef-client -i 1800 -s 20"
description "Chef client"
after "network.target"
exec_start "/usr/bin/chef-client -i 1800 -s 20"
restart "on-failure"
end
else
restart "on-failure"
end
else
:is => %w(inherit null tty journal syslog kmsg journal+console syslog+console kmsg+console socket)
property :standard_error, String,
:is => %w(inherit null tty journal syslog kmsg journal+console syslog+console kmsg+console socket)
:is => %w(inherit null tty journal syslog kmsg journal+console syslog+console kmsg+console socket)
property :standard_error, String,
:is => %w(inherit null tty journal syslog kmsg journal+console syslog+console kmsg+console socket)
+property :success_exit_status, [Integer, String, Array]
property :restart, String,
:is => %w(on-success on-failure on-abnormal on-watchdog on-abort always)
property :private_tmp, [TrueClass, FalseClass]
property :restart, String,
:is => %w(on-success on-failure on-abnormal on-watchdog on-abort always)
property :private_tmp, [TrueClass, FalseClass]
<% if @no_new_privileges -%>
NoNewPrivileges=<%= @no_new_privileges %>
<% end -%>
<% if @no_new_privileges -%>
NoNewPrivileges=<%= @no_new_privileges %>
<% end -%>
+<% if @success_exit_status -%>
+SuccessExitStatus=<%= Array(@success_exit_status).join(" ") %>
+<% end -%>
<% if @restart -%>
Restart=<%= @restart %>
<% end -%>
<% if @restart -%>
Restart=<%= @restart %>
<% end -%>