Skip to content

Commit

Permalink
these should log to the file instead of stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarod committed May 23, 2018
1 parent 1470400 commit 3048aea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/puppet_enterprise_database_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ for db in $DATABASES; do

if [ ${db} == "pe-classifier" ]; then
#Save space before backing up by clearing unused node_check_ins table
/opt/puppetlabs/server/bin/psql -d pe-classifier -c 'TRUNCATE TABLE node_check_ins'
/opt/puppetlabs/server/bin/psql -d pe-classifier -c 'TRUNCATE TABLE node_check_ins' >> ${LOGDIR}/${db}.log 2>&1
if [ $? != 0 ]; then
echo "Failed to truncate node_check_ins table."
echo "Failed to truncate node_check_ins table." >> ${LOGDIR}/${db}.log 2>&1
fi
fi

Expand Down

0 comments on commit 3048aea

Please sign in to comment.