mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
Fix permissions issue
This commit is contained in:
parent
4c9769dcef
commit
f85a766319
@ -154,7 +154,7 @@ function pull_gs {
|
|||||||
echo -en "${STAT} ${MESSAGE}"
|
echo -en "${STAT} ${MESSAGE}"
|
||||||
|
|
||||||
GRAVDB_RWE=$(namei -m ${PIHOLE_DIR}/${GRAVITY_FI} | grep -v f: | 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--" ]
|
if [ $GRAVDB_RWE = "-rw-rw-r--" ]
|
||||||
then
|
then
|
||||||
echo -e "\r${GOOD} ${MESSAGE}"
|
echo -e "\r${GOOD} ${MESSAGE}"
|
||||||
else
|
else
|
||||||
@ -165,7 +165,7 @@ function pull_gs {
|
|||||||
|
|
||||||
MESSAGE="Setting Ownership on ${GRAVITY_FI}"
|
MESSAGE="Setting Ownership on ${GRAVITY_FI}"
|
||||||
echo -en "${STAT} ${MESSAGE}"
|
echo -en "${STAT} ${MESSAGE}"
|
||||||
sudo chmod 644 ${PIHOLE_DIR}/${GRAVITY_FI} >/dev/null 2>&1
|
sudo chmod 664 ${PIHOLE_DIR}/${GRAVITY_FI} >/dev/null 2>&1
|
||||||
error_validate
|
error_validate
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ function push_gs {
|
|||||||
|
|
||||||
MESSAGE="Setting Permissions on ${GRAVITY_FI}"
|
MESSAGE="Setting Permissions on ${GRAVITY_FI}"
|
||||||
echo -en "${STAT} ${MESSAGE}"
|
echo -en "${STAT} ${MESSAGE}"
|
||||||
${SSHPASSWORD} ssh ${REMOTE_USER}@${REMOTE_HOST} "sudo chmod 644 ${PIHOLE_DIR}/${GRAVITY_FI}" >/dev/null 2>&1
|
${SSHPASSWORD} ssh ${REMOTE_USER}@${REMOTE_HOST} "sudo chmod 664 ${PIHOLE_DIR}/${GRAVITY_FI}" >/dev/null 2>&1
|
||||||
error_validate
|
error_validate
|
||||||
|
|
||||||
MESSAGE="Setting Ownership on ${GRAVITY_FI}"
|
MESSAGE="Setting Ownership on ${GRAVITY_FI}"
|
||||||
|
Loading…
Reference in New Issue
Block a user