mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 14:20:18 +00:00
Merge pull request #3739 from pi-hole/tweak/remove_gravity_optimization
Remove extra gravity optimization flag
This commit is contained in:
commit
b865fa7c0a
1 changed files with 0 additions and 17 deletions
17
gravity.sh
17
gravity.sh
|
@ -39,7 +39,6 @@ gravityDBfile="${piholeDir}/gravity.db"
|
||||||
gravityTEMPfile="${piholeDir}/gravity_temp.db"
|
gravityTEMPfile="${piholeDir}/gravity_temp.db"
|
||||||
gravityDBschema="${piholeGitDir}/advanced/Templates/gravity.db.sql"
|
gravityDBschema="${piholeGitDir}/advanced/Templates/gravity.db.sql"
|
||||||
gravityDBcopy="${piholeGitDir}/advanced/Templates/gravity_copy.sql"
|
gravityDBcopy="${piholeGitDir}/advanced/Templates/gravity_copy.sql"
|
||||||
optimize_database=false
|
|
||||||
|
|
||||||
domainsExtension="domains"
|
domainsExtension="domains"
|
||||||
|
|
||||||
|
@ -740,21 +739,6 @@ gravity_Cleanup() {
|
||||||
|
|
||||||
echo -e "${OVER} ${TICK} ${str}"
|
echo -e "${OVER} ${TICK} ${str}"
|
||||||
|
|
||||||
if ${optimize_database} ; then
|
|
||||||
str="Optimizing domains database"
|
|
||||||
echo -ne " ${INFO} ${str}..."
|
|
||||||
# Run VACUUM command on database to optimize it
|
|
||||||
output=$( { sqlite3 "${gravityDBfile}" "VACUUM;"; } 2>&1 )
|
|
||||||
status="$?"
|
|
||||||
|
|
||||||
if [[ "${status}" -ne 0 ]]; then
|
|
||||||
echo -e "\\n ${CROSS} Unable to optimize gravity database ${gravityDBfile}\\n ${output}"
|
|
||||||
error="error"
|
|
||||||
else
|
|
||||||
echo -e "${OVER} ${TICK} ${str}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Only restart DNS service if offline
|
# Only restart DNS service if offline
|
||||||
if ! pgrep pihole-FTL &> /dev/null; then
|
if ! pgrep pihole-FTL &> /dev/null; then
|
||||||
"${PIHOLE_COMMAND}" restartdns
|
"${PIHOLE_COMMAND}" restartdns
|
||||||
|
@ -781,7 +765,6 @@ Options:
|
||||||
for var in "$@"; do
|
for var in "$@"; do
|
||||||
case "${var}" in
|
case "${var}" in
|
||||||
"-f" | "--force" ) forceDelete=true;;
|
"-f" | "--force" ) forceDelete=true;;
|
||||||
"-o" | "--optimize" ) optimize_database=true;;
|
|
||||||
"-r" | "--recreate" ) recreate_database=true;;
|
"-r" | "--recreate" ) recreate_database=true;;
|
||||||
"-h" | "--help" ) helpFunc;;
|
"-h" | "--help" ) helpFunc;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue