Skip to content

mapi68/pihole-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Pi-hole Query Number Modifier

License: MIT Shell Script Pi-hole v5 Pi-hole v6

A collection of scripts to customize the number of queries displayed in Pi-hole's dashboard for both v5 and v6.

🌟 Overview

These scripts allow you to modify how many queries are displayed in various sections of the Pi-hole dashboard, including:

  • πŸ“ Top Permitted Domains
  • 🚫 Top Blocked Domains
  • πŸ‘₯ Top Clients (total)
  • β›” Top Clients (blocked only)

πŸ”„ Version Compatibility

  • πŸ“Œ pihole-change-queries-number_v5.bash - Compatible with Pi-hole v5
  • πŸ“Œ pihole-change-queries-number_v6.bash - Compatible with Pi-hole v6

✨ Features

  • πŸ”„ Reset to default values (10 queries)
  • ⚑ Predefined optimal values for medium-sized servers
  • πŸŽ›οΈ Custom configuration (10-99 queries)
  • 🎨 Color-coded terminal output (v6 script)
  • πŸ”™ Restore functionality
  • πŸ–₯️ User-friendly interactive interface

πŸ“‹ Prerequisites

  • πŸ”‘ Root access to your Pi-hole server
  • πŸš€ Running Pi-hole v5 or v6 installation
  • πŸ’» Basic command line knowledge

πŸ› οΈ Installation

  1. Clone this repository:

    git clone https://github.com/mapi68/pihole-script.git
  2. Navigate to the script directory:

    cd pihole-script
  3. Make the script executable:

    chmod +x pihole-change-queries-number_v6.bash # For Pi-hole v6 # OR chmod +x pihole-change-queries-number_v5.bash # For Pi-hole v5

πŸ“ Usage

For Pi-hole v6:

sudo ./pihole-change-queries-number_v6.bash

For Pi-hole v5:

sudo ./pihole-change-queries-number_v5.bash

βš™οΈ Configuration Options

πŸ”΅ Pi-hole v5

Optimal Mode (Recommended for medium servers)

Optimal Mode - v5 Pi-hole v5 Optimal Mode Configuration

  • βœ… Sets optimized values for a medium-sized Pi-hole server
  • βœ… Top Domains: 15 entries
  • βœ… Top Clients: 30 entries

Manual Mode

Manual Mode - v5 Pi-hole v5 Manual Configuration

  • πŸ”§ Customize the number of entries (10-99) for:
    • Top Permitted Domains
    • Top Blocked Domains
    • Top Clients (total)
    • Top Clients (blocked only)

πŸ”΅ Pi-hole v6

Optimal Mode

Optimal Mode - v6 Pi-hole v6 Optimal Mode Configuration

  • βœ… Sets optimized values for a medium-sized Pi-hole server
  • βœ… Enhanced color-coded interface
  • βœ… Top Domains: 15 entries
  • βœ… Top Clients: 30 entries

Manual Mode

Manual Mode - v6 Pi-hole v6 Manual Configuration

  • 🎨 Modern interface with color-coded messages
  • πŸ”§ Customize the number of entries (10-99) for:
    • Top Permitted Domains
    • Top Blocked Domains
    • Top Clients (total)
    • Top Clients (blocked only)

Dashboard Result

Dashboard Results Pi-hole Dashboard View (Same layout for both v5 and v6)

πŸš€ After Installation

After running the script, you'll need to:

  1. πŸ”„ Refresh your Pi-hole web interface
  2. ✨ The new query numbers will be displayed in the dashboard

❗ Troubleshooting

  • πŸ”„ If you encounter any issues, the script will automatically download the original file from Pi-hole repository (v6)
  • 🎨 Error messages are color-coded for easy identification
  • βœ… Invalid inputs are properly handled with appropriate error messages

↩️ Reverting Changes

The script automatically resets to default values (10) before applying new ones. If you need to revert:

  1. πŸ”„ Run the script again
  2. ⏹️ Choose to exit after the reset

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘€ Author

πŸ’¬ Support

If you encounter any issues or have questions, please open an issue on the GitHub repository.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

Scripts to customize the number of displayed queries in Pi-hole's dashboard (v5/v6)

Topics

Resources

License

Stars

Watchers

Forks

Languages