property :exec_start_pre, String
property :exec_start, String, :required => true
property :exec_start_post, String
property :exec_stop, String
property :exec_reload, String
property :exec_start_pre, String
property :exec_start, String, :required => true
property :exec_start_post, String
property :exec_stop, String
property :exec_reload, String
property :standard_input, String,
:is => %w(null tty tty-force tty-fail socket)
property :standard_output, String,
property :standard_input, String,
:is => %w(null tty tty-force tty-fail socket)
property :standard_output, String,
property :private_network, [TrueClass, FalseClass]
property :protect_system, [TrueClass, FalseClass, String]
property :protect_home, [TrueClass, FalseClass, String]
property :private_network, [TrueClass, FalseClass]
property :protect_system, [TrueClass, FalseClass, String]
property :protect_home, [TrueClass, FalseClass, String]
-property :timeout_sec, Fixnum
+property :no_new_privileges, [TrueClass, FalseClass]
+property :timeout_sec, Integer
+ service_variables = new_resource.to_hash
+
+ if environment_file.is_a?(Hash)
+ template "/etc/default/#{name}" do
+ cookbook "systemd"
+ source "environment.erb"
+ owner "root"
+ group "root"
+ mode 0o640
+ variables :environment => environment_file
+ end
+
+ service_variables[:environment_file] = "/etc/default/#{name}"
+ end
+