mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
New way to validate permissions
This commit is contained in:
parent
94d8c74757
commit
85da9aa8f8
@ -145,15 +145,19 @@ function pull_gs {
|
||||
MESSAGE="Validating Permissions on ${GRAVITY_FI}"
|
||||
echo -en "${STAT} ${MESSAGE}"
|
||||
|
||||
if [ ! u-w "${PIHOLE_DIR}/${GRAVITY_FI}" ]
|
||||
GRAVDB_RWE=$(namei -m ${PIHOLE_DIR}/${GRAVITY_FI} | grep ${GRAVITY_FI} | awk '{print $1}' )
|
||||
if [ $GRAVDB_RWE "-rw-r--r--" ]
|
||||
then
|
||||
echo -e "\r${GOOD} ${MESSAGE}"
|
||||
else
|
||||
echo -e "\r${FAIL} $MESSAGE"
|
||||
|
||||
|
||||
MESSAGE2="Attempting to Compensate"
|
||||
|
||||
MESSAGE="Setting Ownership on ${GRAVITY_FI}"
|
||||
echo -en "${STAT} ${MESSAGE}"
|
||||
sudo chmod 644 ${PIHOLE_DIR}/${GRAVITY_FI} >/dev/null 2>&1
|
||||
error_validate
|
||||
else
|
||||
echo -e "\r${GOOD} ${MESSAGE}"
|
||||
fi
|
||||
|
||||
# MESSAGE="Setting Permissions on ${GRAVITY_FI}"
|
||||
|
Loading…
Reference in New Issue
Block a user