mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
Validate gravity.db owner
This commit is contained in:
parent
5026317586
commit
217efbfb8b
@ -131,6 +131,16 @@ function pull_gs {
|
|||||||
sudo chown pihole:pihole ${PIHOLE_DIR}/${GRAVITY_FI} >/dev/null 2>&1
|
sudo chown pihole:pihole ${PIHOLE_DIR}/${GRAVITY_FI} >/dev/null 2>&1
|
||||||
error_validate
|
error_validate
|
||||||
|
|
||||||
|
MESSAGE="Validating Ownership on ${GRAVITY_FI}"
|
||||||
|
echo -en "${STAT} ${MESSAGE}"
|
||||||
|
GRAVDB_OWN=$(ls -ld ${PIHOLE_DIR}/${GRAVITY_FI} | awk '{print $3}')
|
||||||
|
if $GRAVDB_OWN = 'pihole'
|
||||||
|
then
|
||||||
|
echo -e "\r${GOOD} ${MESSAGE}"
|
||||||
|
else
|
||||||
|
echo -e "\r${FAIL} ${MESSAGE}"
|
||||||
|
fi
|
||||||
|
|
||||||
MESSAGE="Pausing One Second"
|
MESSAGE="Pausing One Second"
|
||||||
echo -e "${INFO} ${MESSAGE}"
|
echo -e "${INFO} ${MESSAGE}"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
Loading…
Reference in New Issue
Block a user