From e314577d70a14c32a6ce903e736cc9146a4cdb35 Mon Sep 17 00:00:00 2001 From: brad Date: Sat, 29 Apr 2017 15:12:04 +1000 Subject: [PATCH] Fix issue #83, mode not applied to new downloads --- manifests/fetch.pp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/manifests/fetch.pp b/manifests/fetch.pp index e0ff9ae..ffa92df 100644 --- a/manifests/fetch.pp +++ b/manifests/fetch.pp @@ -183,6 +183,22 @@ path => $exec_path, require => Package['wget'], schedule => $schedule, + notify => Exec["wget-${name}-mode"], + } + + if $mode != undef { + exec { "wget-${name}-mode": + command => "chmod ${mode} ${_destination}", + user => $exec_user, + path => $exec_path, + refreshonly => true, + } + } else { + exec { "wget-${name}-mode": + command => 'true', + path => $exec_path, + refreshonly => true, + } } if $cache_dir != undef {