Skip to content

araujofrancisco/pihole-group

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

pihole-group

Description

This script is mean to update pihole group to enable/disable when running on a docker container, the change is achived updating the gravity database directly using docker exec command. Intended to allow using cron to schedule job and enable/disable rules automatically.
Update the database only if current value is different from the parameter, this allow the script to return the affected rows that could be used for expanded automation.

Setting it up

Set the script to executable: chmod +x pihole-group.sh

Usage

pihole-group.sh < enable | disable > < group-name1,group-name2,group-name3 >
Multiple groups can be updated at once passing as second parameter comma separated list.
You might require root permissions to execute docker commands.

Notes

Depending on docker container setup you might require to change the pihole and database variables to point the right place.

About

Script to all enable/disable docker pihole group.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages