pass argument from pihole command to gravity for -f check

This commit is contained in:
Promofaux 2016-08-19 23:06:56 +01:00
parent 475d016029
commit 6796b8bdad
2 changed files with 3 additions and 3 deletions

View File

@ -344,14 +344,14 @@ function gravity_reload() {
for var in "$@" for var in "$@"
do do
case "$var" in case "$var" in
"-f" | "--force" ) force=true;; "-f" | "--force" ) forceGrav=true;;
"-h" | "--help" ) helpFunc;; "-h" | "--help" ) helpFunc;;
esac esac
done done
#Overwrite adlists.default from /etc/.pihole in case any changes have been made. Changes should be saved in /etc/adlists.list #Overwrite adlists.default from /etc/.pihole in case any changes have been made. Changes should be saved in /etc/adlists.list
if [[ ${force} == true ]]; then if [[ ${forceGrav} == true ]]; then
echo -n "::: Deleting exising list cache..." echo -n "::: Deleting exising list cache..."
${SUDO} rm /etc/pihole/list.* ${SUDO} rm /etc/pihole/list.*
echo " done!" echo " done!"

2
pihole
View File

@ -53,7 +53,7 @@ function updateDashboardFunc {
} }
function updateGravityFunc { function updateGravityFunc {
$SUDO /opt/pihole/gravity.sh $SUDO /opt/pihole/gravity.sh "$@"
exit 1 exit 1
} }