Move the debug logs env variable to an attribute
Set it to 'sockethub*' for now as Nick advised, see #91
This commit is contained in:
parent
29a5947d18
commit
43736cd8e9
|
@ -2,3 +2,4 @@ node.default['sockethub']['port'] = '10551'
|
||||||
node.default['sockethub']['external_port'] = '10550'
|
node.default['sockethub']['external_port'] = '10550'
|
||||||
node.default['sockethub']['version'] = '3.1.4'
|
node.default['sockethub']['version'] = '3.1.4'
|
||||||
node.default['sockethub']['nginx']['server_name'] = 'sockethub.kosmos.org'
|
node.default['sockethub']['nginx']['server_name'] = 'sockethub.kosmos.org'
|
||||||
|
node.default['sockethub']['debug_logs'] = 'sockethub*'
|
||||||
|
|
|
@ -48,6 +48,15 @@ execute "systemctl daemon-reload" do
|
||||||
action :nothing
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
environment_variables = {
|
||||||
|
'PORT' => node['sockethub']['port'],
|
||||||
|
# Use the second database (index starts at 0)
|
||||||
|
'REDIS_URL' => "redis://localhost:6379/1"
|
||||||
|
}
|
||||||
|
unless node['sockethub']['debug_logs'].nil?
|
||||||
|
environment_variables['DEBUG'] = node['sockethub']['debug_logs']
|
||||||
|
end
|
||||||
|
|
||||||
template "/lib/systemd/system/sockethub_nodejs.service" do
|
template "/lib/systemd/system/sockethub_nodejs.service" do
|
||||||
source 'nodejs.systemd.service.erb'
|
source 'nodejs.systemd.service.erb'
|
||||||
owner 'root'
|
owner 'root'
|
||||||
|
@ -57,10 +66,7 @@ template "/lib/systemd/system/sockethub_nodejs.service" do
|
||||||
user: "sockethub",
|
user: "sockethub",
|
||||||
group: "sockethub",
|
group: "sockethub",
|
||||||
entry: "/usr/bin/sockethub",
|
entry: "/usr/bin/sockethub",
|
||||||
environment: { 'DEBUG' => '*',
|
environment: environment_variables
|
||||||
'PORT' => node['sockethub']['port'],
|
|
||||||
# Use the second database (index starts at 0)
|
|
||||||
'REDIS_URL' => "redis://localhost:6379/1" }
|
|
||||||
)
|
)
|
||||||
notifies :run, "execute[systemctl daemon-reload]", :delayed
|
notifies :run, "execute[systemctl daemon-reload]", :delayed
|
||||||
notifies :restart, "service[sockethub_nodejs]", :delayed
|
notifies :restart, "service[sockethub_nodejs]", :delayed
|
||||||
|
|
Loading…
Reference in New Issue