forked from ISTI-ansible-roles/ansible-roles
library/roles/postgresql: Fix a broken check in postgresql-backup.cron. Now if backuppc is running, the cron job does nothing.
This commit is contained in:
parent
cffd1ce098
commit
5f73bac089
|
@ -181,7 +181,7 @@ postgres_gis_pkgs:
|
|||
pg_backup_enabled: True
|
||||
pg_backup_bin: /usr/local/sbin/postgresql-backup
|
||||
pg_backup_pgdump_bin: /usr/bin/pg_dump
|
||||
pg_backup_retain_copies: 15
|
||||
pg_backup_retain_copies: 1
|
||||
pg_backup_build_db_list: "no"
|
||||
# Dynamically created from psql_db_data if pg_backup_db_list is not set
|
||||
#pg_backup_db_list: '{{ psql_db_name}}'
|
||||
|
|
|
@ -22,7 +22,7 @@ if [ -f /var/log/backuppc.log ] ; then
|
|||
TMSTMP=$( date +%s )
|
||||
. /var/log/backuppc.log
|
||||
LAST_BACKUP_TIME=$( expr $TMSTMP - $BACKUP_TIMESTAMP )
|
||||
if [ $LAST_BACKUP_TIME -gt 86400 -a $BACKUP_RESULT == 'OK' ] ; then
|
||||
if [ $LAST_BACKUP_TIME -lt 86400 -a $BACKUP_RESULT == 'OK' ] ; then
|
||||
echo "BackupPC is active, doing nothing" > $LOG_FILE
|
||||
exit 0
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue