diff --git a/modules/elastic_recheck/manifests/cron.pp b/modules/elastic_recheck/manifests/cron.pp index 37bf006844..aa1e8a7c3d 100644 --- a/modules/elastic_recheck/manifests/cron.pp +++ b/modules/elastic_recheck/manifests/cron.pp @@ -26,7 +26,7 @@ class elastic_recheck::cron () { user => 'recheck', minute => '*/15', hour => '*', - command => "cd ${er_state_path}; er_safe_run.sh ${graph_cmd}", + command => "cd ${er_state_path} && er_safe_run.sh ${graph_cmd}", environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin', require => Class['elastic_recheck'] } @@ -35,7 +35,7 @@ class elastic_recheck::cron () { user => 'recheck', minute => '59', hour => '*', - command => "cd ${er_state_path}; er_safe_run.sh ${graph_cmd}", + command => "cd ${er_state_path} && er_safe_run.sh ${uncat_cmd}", environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin', require => Class['elastic_recheck'] } diff --git a/modules/elastic_recheck/manifests/init.pp b/modules/elastic_recheck/manifests/init.pp index f8e3de37d5..6867565a32 100644 --- a/modules/elastic_recheck/manifests/init.pp +++ b/modules/elastic_recheck/manifests/init.pp @@ -46,8 +46,9 @@ class elastic_recheck ( } exec { 'run_er_graph': - command => "cd ${recheck_state_dir} && er_safe_run.sh ${graph_cmd}", + command => "er_safe_run.sh ${graph_cmd}", path => '/usr/local/bin:/usr/bin:/bin/', + cwd => $recheck_state_dir, user => 'recheck', refreshonly => true, require => File['/usr/local/bin/er_safe_run.sh'], @@ -55,8 +56,9 @@ class elastic_recheck ( } exec { 'run_er_uncat': - command => "cd ${recheck_state_dir} && er_safe_run.sh ${uncat_cmd}", + command => "er_safe_run.sh ${uncat_cmd}", path => '/usr/local/bin:/usr/bin:/bin/', + cwd => $recheck_state_dir, user => 'recheck', refreshonly => true, require => File['/usr/local/bin/er_safe_run.sh'],