Last active
January 13, 2021 13:03
-
-
Save jamiehowarth0/63284dbd506fd938ee8d1645cc0e3352 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A crontab to turn pi-hole groups on and off at set times of day, Mon-Fri | |
# Replace <work group> and <personal group> with the names of your own groups that you've established. | |
# Both my groups are pinned to my laptop's IP, so enabling the "Work" list, which whitelists Google Analytics, | |
# only affects one device. | |
* 18 * * 1-5 root sqlite3 -line /etc/pihole/gravity.db "UPDATE [group] SET [enabled] = 0 WHERE [name] = '<work group>'; UPDATE [group] SET [enabled] = 1 WHERE [name] = '<personal group>';" && pihole restartdns reload-lists | |
* 9 * * 1-5 root sqlite3 -line /etc/pihole/gravity.db "UPDATE [group] SET [enabled] = 1 WHERE [name] = '<work group>'; UPDATE [group] SET [enabled] = 0 WHERE [name] = '<personal group>';" && pihole restartdns reload-lists |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment