Update gravity-sync.sh

This commit is contained in:
Michael Stanclift 2020-05-26 11:52:28 -05:00
parent fed01efbff
commit 0ac26f1e8c

View File

@ -145,7 +145,7 @@ function pull_gs {
MESSAGE="Validating Permissions on ${GRAVITY_FI}"
echo -en "${STAT} ${MESSAGE}"
GRAVDB_RWE=$(namei -m ${PIHOLE_DIR}/${GRAVITY_FI} | grep ${GRAVITY_FI} | awk '{print $1}')
GRAVDB_RWE=$(namei -m ${PIHOLE_DIR}/${GRAVITY_FI} | grep -v f: | grep ${GRAVITY_FI} | awk '{print $1}')
if [ $GRAVDB_RWE == "-rw-r--r--" ]
then
echo -e "\r${GOOD} ${MESSAGE}"
@ -157,7 +157,7 @@ function pull_gs {
MESSAGE="Setting Ownership on ${GRAVITY_FI}"
echo -en "${STAT} ${MESSAGE}"
sudo chmod 644 ${PIHOLE_DIR}/${GRAVITY_FI} >/dev/null 2>&1
sudo chmod 644 ${PIHOLE_DIR}/${GRAVITY_FI} >/dev/null 2>&1
error_validate
fi