diff --git a/recipes/sentinel.rb b/recipes/sentinel.rb index 20d3dad5..eaa8d53b 100644 --- a/recipes/sentinel.rb +++ b/recipes/sentinel.rb @@ -46,10 +46,16 @@ base_piddir redis['base_piddir'] end -template '/usr/lib/systemd/system/redis-sentinel@.service' do +bin_path = if node['redisio']['install_dir'] + ::File.join(node['redisio']['install_dir'], 'bin') + else + node['redisio']['bin_path'] + end + +template '/lib/systemd/system/redis-sentinel@.service' do source 'redis-sentinel@.service' variables( - bin_path: node['redisio']['bin_path'], + bin_path: bin_path, limit_nofile: redis['default_settings']['maxclients'] + 32 ) only_if { node['redisio']['job_control'] == 'systemd' } diff --git a/recipes/sentinel_enable.rb b/recipes/sentinel_enable.rb index 0d418c2c..960d3cbc 100644 --- a/recipes/sentinel_enable.rb +++ b/recipes/sentinel_enable.rb @@ -32,7 +32,7 @@ end execute 'reload-systemd-sentinel' do - command '/usr/bin/systemctl daemon-reload' + command 'systemctl daemon-reload' only_if { node['redisio']['job_control'] == 'systemd' } action :nothing end