mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-26 16:13:17 +00:00
Run gravity as user pihole
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
6001fe34ec
commit
679aab10d0
2 changed files with 2 additions and 9 deletions
|
@ -1385,8 +1385,8 @@ installCron() {
|
||||||
# Gravity is a very important script as it aggregates all of the domains into a single HOSTS formatted list,
|
# Gravity is a very important script as it aggregates all of the domains into a single HOSTS formatted list,
|
||||||
# which is what Pi-hole needs to begin blocking ads
|
# which is what Pi-hole needs to begin blocking ads
|
||||||
runGravity() {
|
runGravity() {
|
||||||
# Run gravity in the current shell
|
# Run gravity in the current shell as user pihole
|
||||||
{ /opt/pihole/gravity.sh --force; }
|
{ exec sudo -u pihole bash /opt/pihole/gravity.sh --force; }
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if the pihole user exists and create if it does not
|
# Check if the pihole user exists and create if it does not
|
||||||
|
|
|
@ -488,10 +488,6 @@ compareLists() {
|
||||||
# We assume here it was changed upstream
|
# We assume here it was changed upstream
|
||||||
database_adlist_status "${adlistID}" "1"
|
database_adlist_status "${adlistID}" "1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set owner of the file to pihole
|
|
||||||
chown pihole:pihole "${target}.sha1"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download specified URL and perform checks on HTTP status and file content
|
# Download specified URL and perform checks on HTTP status and file content
|
||||||
|
@ -625,9 +621,6 @@ gravity_DownloadBlocklistFromUrl() {
|
||||||
database_adlist_status "${adlistID}" "4"
|
database_adlist_status "${adlistID}" "4"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set owner of the file to pihole
|
|
||||||
chown pihole:pihole "${saveLocation}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Parse source files into domains format
|
# Parse source files into domains format
|
||||||
|
|
Loading…
Reference in a new issue