Check for /etc/evomaintenance.cf permissions

This commit is contained in:
Romain Dessort 2017-09-11 10:11:58 -04:00
parent 461dec1a37
commit 9e21e22414

View file

@ -608,7 +608,9 @@ fi
# Verification de la configuration d'evomaintenance
if [ "$IS_EVOMAINTENANCECONF" = 1 ]; then
f=/etc/evomaintenance.cf
( test -e $f && grep "^export PGPASSWORD" $f |grep -qv "your-passwd" \
( test -e $f \
&& test $(stat -c "%a" $f) = "600" \
&& grep "^export PGPASSWORD" $f |grep -qv "your-passwd" \
&& grep "^PGDB" $f |grep -qv "your-db" \
&& grep "^PGTABLE" $f |grep -qv "your-table" \
&& grep "^PGHOST" $f |grep -qv "your-pg-host" \