fix evobakup scripts detection

find returns with 0 even if nothing is found, so we use the number of 
occurences
This commit is contained in:
Jérémy Lecour 2019-03-23 01:35:26 +01:00
parent c9acd91671
commit f377df3370

View file

@ -722,7 +722,8 @@ if is_debian; then
# Verification de la mise en place d'evobackup
if [ "$IS_EVOBACKUP" = 1 ]; then
find /etc/cron* -name '*evobackup*' > /dev/null || failed "IS_EVOBACKUP"
evobackup_found=$(find /etc/cron* -name '*evobackup*' | wc -l)
test "$evobackup_found" -gt 0 || failed "IS_EVOBACKUP"
fi
# Verification de la presence du userlogrotate