Giter VIP home page Giter VIP logo

pihole-switch's Introduction

Pihole Switch

CI

A command line tool to enable/disable your pihole

Sometimes you just need to disable your pihole for some website to work. PiholeSwitch makes this operation much easier.

Just open a terminal, and you can disable pihole in a moment and for as long as you want.

Table of contents

Installation

Recommended

$ curl -s https://raw.githubusercontent.com/devmatteini/pihole-switch/master/install.sh | bash

Download the latest release and unzip the phs.zip file.

After the archive is unzipped, move the phs binary in a folder included in your $PATH (it's commonly used /usr/local/bin).

From source

git clone https://github.com/devmatteini/pihole-switch && cd pihole-switch
cargo build --release
./target/release/phs

Usage

Export an environment variable PIHOLE_TOKEN=<pihole_api_token>.

You can find the api token here: http://pi.hole/admin/settings.php?tab=api, then under the section Query log, click on the button Show API token and confirm.

Commands

Enable pihole

$ phs enable

Disable pihole (indefinitely)

$ phs disable

Disable pihole for 20 seconds

$ phs disable --time 20

If your device doesn't have pihole set as dns

$ phs --host 192.168.1.50 disable

(where 192.168.1.50 is the pihole ip address)

Enable/disable by passing the api token as an argument, instead of using the PIHOLE_TOKEN environment variable

$ phs enable <api_token>

Note: the PIHOLE_TOKEN environment variable will always have priority even if you pass the api token as an argument

License

pihole-switch is made available under the terms of the MIT License.

See the MIT License file for license details.

pihole-switch's People

Contributors

devmatteini avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.