Fix backup gem notifications failing
This was caused by a bogus PATH that did not include /usr/sbin. The root user's default PATH includes that, so /usr/sbin/sendmail provided by postfix is in it Fixes #27
This commit is contained in:
parent
36a4beaed9
commit
7073e5d574
@ -45,7 +45,6 @@ template "#{backup_dir}/config.rb" do
|
||||
mail_from: "backups@kosmos.org"
|
||||
end
|
||||
|
||||
if node["backup"]["default_model"]
|
||||
template "#{backup_dir}/models/default.rb" do
|
||||
source "backup.rb.erb"
|
||||
mode 0640
|
||||
@ -54,7 +53,14 @@ if node["backup"]["default_model"]
|
||||
cron "default backup model" do
|
||||
hour node['backup']['cron']['hour']
|
||||
minute node['backup']['cron']['minute']
|
||||
command "/usr/bin/env HOME=/home/user PATH=/usr/local/bin:/usr/local/ruby/bin:/usr/bin:/bin:$PATH /bin/sh -l -c 'backup perform -t default --root-path #{backup_dir} >> /var/log/backup.log 2>&1'"
|
||||
command "/usr/bin/env HOME=/root /bin/sh -l -c '/usr/local/bin/backup perform -t default --root-path #{backup_dir} >> /var/log/backup.log 2>&1'"
|
||||
end
|
||||
|
||||
include_recipe 'logrotate'
|
||||
# Install MySQL client (includes mysqldump)
|
||||
mysql_client 'default' do
|
||||
action :create
|
||||
not_if { node["backup"]["mysql"]["databases"].empty? }
|
||||
end
|
||||
|
||||
include_recipe 'logrotate'
|
||||
|
Loading…
x
Reference in New Issue
Block a user