Add POSTGRES_BACKUP check

This commit is contained in:
Benoît.S 2017-12-06 10:28:39 +01:00
parent 6c37875d1f
commit 227249f411

View file

@ -90,6 +90,8 @@ IS_MYSQLMUNIN=1
IS_PHPEVOLINUXCONF=1
IS_SQUIDLOGROTATE=1
IS_SQUIDEVOLINUXCONF=1
IS_SQL_BACKUP=1
IS_POSTGRES_BACKUP=1
#Proper to OpenBSD
IS_SOFTDEP=1
@ -582,13 +584,22 @@ if [ -e /etc/debian_version ]; then
fi
if [ "$IS_SQL_BACKUP" = 1 ]; then
if (is_installed mysql-server || is_installed mariadb-server); then
if (is_installed "mysql-server" || is_installed "mariadb-server"); then
# You could change the default path in /etc/evocheck.cf
SQL_BACKUP_PATH=${SQL_BACKUP_PATH:-"/home/backup/mysql.bak.gz"}
test -f "$SQL_BACKUP_PATH" || echo 'IS_SQL_BACKUP FAILED!'
fi
fi
if [ "$IS_POSTGRES_BACKUP" = 1 ]; then
if is_installed "postgresql-9*"; then
# If you use something like barman, you should deactivate this check
# You could change the default path in /etc/evocheck.cf
POSTGRES_BACKUP_PATH=${POSTGRES_BACKUP_PATH:-"/home/backup/pg.dump.bak"}
test -f "$POSTGRES_BACKUP_PATH" || echo 'IS_POSTGRES_BACKUP FAILED!'
fi
fi
if [ "$IS_LDAP_BACKUP" = 1 ]; then
if is_installed slapd; then
# You could change the default path in /etc/evocheck.cf