From 95273e46d4248c1ef0b6f1d3b12db56c6b3600ba Mon Sep 17 00:00:00 2001 From: Bob Belnap Date: Fri, 23 Feb 2018 15:04:18 -0500 Subject: [PATCH] add path, shebang, source .bashrc, MAILTO in cron --- manifests/requestor.pp | 8 +++++--- templates/domain.epp | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/manifests/requestor.pp b/manifests/requestor.pp index c8eeb9f..54f511d 100644 --- a/manifests/requestor.pp +++ b/manifests/requestor.pp @@ -23,6 +23,7 @@ class acme_vault::requestor ( include acme_vault::common $requestor_bashrc_template = @(END) +export PATH=$HOME:$PATH export TLDEXTRACT_CACHE=$HOME/.tld_set export PROVIDER=<%= @lexicon_provider %> export LEXICON_<%= @lexicon_provider.upcase %>_USERNAME=<%= @lexicon_username %> @@ -70,9 +71,10 @@ END ) } cron { "${domain}_issue": - command => "${home_dir}/${domain}.sh", - user => $user, - weekday => 1, + command => "${home_dir}/${domain}.sh", + user => $user, + weekday => 1, + environment => "MAILTO=${contact_email}", } } diff --git a/templates/domain.epp b/templates/domain.epp index 6ba73eb..8c914e0 100644 --- a/templates/domain.epp +++ b/templates/domain.epp @@ -1,3 +1,6 @@ +#!/bin/bash +. ${HOME}/.bashrc + <%= $acme_script %> \ --issue \ <% if $staging { -%>