diff --git a/spec/recipes/cron_spec.rb b/spec/recipes/cron_spec.rb index 56217e0..0029f9d 100644 --- a/spec/recipes/cron_spec.rb +++ b/spec/recipes/cron_spec.rb @@ -12,7 +12,7 @@ }) end it 'will create the cron script' do - expect(chef_run).to render_file('/usr/local/sbin/certbot-renew.sh').with_content(%r(^certbot renew --post-hook "touch \$UPDATE_FLAG_FILE"$)) + expect(chef_run).to render_file('/usr/local/sbin/certbot-renew.sh').with_content(%r(^certbot renew --quiet --post-hook "touch \$UPDATE_FLAG_FILE"$)) end end diff --git a/templates/default/certbot-renew.sh.erb b/templates/default/certbot-renew.sh.erb index a66c20c..254f69d 100644 --- a/templates/default/certbot-renew.sh.erb +++ b/templates/default/certbot-renew.sh.erb @@ -5,7 +5,7 @@ rm -f $UPDATE_FLAG_FILE <% if node['certbot']['sandbox']['enabled'] -%> su - <%=node['certbot']['sandbox']['user'] %> -c "<%= node['certbot']['bin'] %> renew --post-hook \"touch $UPDATE_FLAG_FILE\"" <% else -%> -<%= node['certbot']['bin'] %> renew --post-hook "touch $UPDATE_FLAG_FILE" +<%= node['certbot']['bin'] %> renew --quiet --post-hook "touch $UPDATE_FLAG_FILE" <% end -%> if [ $? -gt 0 ]; then