forked from evolix/ansible-roles
evocheck: upstream version 19.11.2
This commit is contained in:
parent
767760cbe0
commit
7f6ad406a5
|
@ -36,7 +36,7 @@ The **patch** part changes incrementally at each release.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
* elasticsearch: listen on local interface only by default
|
* elasticsearch: listen on local interface only by default
|
||||||
* evocheck: upstream version 19.11.1
|
* evocheck: upstream version 19.11.2
|
||||||
* evocheck: cron jobs execute in verbose
|
* evocheck: cron jobs execute in verbose
|
||||||
* evolinux-base: use "evolinux_internal_group" for SSH authentication
|
* evolinux-base: use "evolinux_internal_group" for SSH authentication
|
||||||
* evomaintenance: Turn on API by default (instead of DB)
|
* evomaintenance: Turn on API by default (instead of DB)
|
||||||
|
|
|
@ -444,9 +444,10 @@ check_squid() {
|
||||||
}
|
}
|
||||||
check_evomaintenance_fw() {
|
check_evomaintenance_fw() {
|
||||||
if [ -f "$MINIFW_FILE" ]; then
|
if [ -f "$MINIFW_FILE" ]; then
|
||||||
|
hook_db=$(grep -E '^\s*HOOK_DB' /etc/evomaintenance.cf | tr -d ' ' | cut -d= -f2)
|
||||||
rulesNumber=$(grep -c "/sbin/iptables -A INPUT -p tcp --sport 5432 --dport 1024:65535 -s .* -m state --state ESTABLISHED,RELATED -j ACCEPT" "$MINIFW_FILE")
|
rulesNumber=$(grep -c "/sbin/iptables -A INPUT -p tcp --sport 5432 --dport 1024:65535 -s .* -m state --state ESTABLISHED,RELATED -j ACCEPT" "$MINIFW_FILE")
|
||||||
if [ "$rulesNumber" -lt 2 ]; then
|
if [ "$hook_db" = "1" ] && [ "$rulesNumber" -lt 2 ]; then
|
||||||
failed "IS_EVOMAINTENANCE_FW" "missing evomaintenance rules in minifirewall"
|
failed "IS_EVOMAINTENANCE_FW" "HOOK_DB is enabled but missing evomaintenance rules in minifirewall"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -658,9 +659,14 @@ check_muninrunning() {
|
||||||
}
|
}
|
||||||
# Check if files in /home/backup/ are up-to-date
|
# Check if files in /home/backup/ are up-to-date
|
||||||
check_backupuptodate() {
|
check_backupuptodate() {
|
||||||
if [ -d /home/backup/ ]; then
|
# find local backup directory
|
||||||
if [ -n "$(ls -A /home/backup/)" ]; then
|
backup_dir=$(grep --no-messages 'LOCAL_BACKUP_DIR=' /etc/cron.daily/zzz_evobackup | tr -d \" | cut -d= -f2)
|
||||||
for file in /home/backup/*; do
|
if [ -z "${backup_dir}" ]; then
|
||||||
|
backup_dir="/home/backup"
|
||||||
|
fi
|
||||||
|
if [ -d "${backup_dir}" ]; then
|
||||||
|
if [ -n "$(ls -A ${backup_dir})" ]; then
|
||||||
|
for file in ${backup_dir}/*; do
|
||||||
limit=$(date +"%s" -d "now - 2 day")
|
limit=$(date +"%s" -d "now - 2 day")
|
||||||
updated_at=$(stat -c "%Y" "$file")
|
updated_at=$(stat -c "%Y" "$file")
|
||||||
|
|
||||||
|
@ -670,10 +676,10 @@ check_backupuptodate() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
failed "IS_BACKUPUPTODATE" "/home/backup/ is empty"
|
failed "IS_BACKUPUPTODATE" "${backup_dir}/ is empty"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
failed "IS_BACKUPUPTODATE" "/home/backup/ is missing"
|
failed "IS_BACKUPUPTODATE" "${backup_dir}/ is missing"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
check_etcgit() {
|
check_etcgit() {
|
||||||
|
@ -1458,7 +1464,7 @@ readonly PROGDIR=$(realpath -m "$(dirname "$0")")
|
||||||
# shellcheck disable=2124
|
# shellcheck disable=2124
|
||||||
readonly ARGS=$@
|
readonly ARGS=$@
|
||||||
|
|
||||||
readonly VERSION="19.11.1"
|
readonly VERSION="19.11.2"
|
||||||
|
|
||||||
# Disable LANG*
|
# Disable LANG*
|
||||||
export LANG=C
|
export LANG=C
|
||||||
|
|
Loading…
Reference in a new issue