mirror of
https://github.com/pi-hole/PADD.git
synced 2025-12-24 13:19:01 +00:00
PADD v4.0.0 (#373)
This commit is contained in:
2
.github/workflows/codespell.yml
vendored
2
.github/workflows/codespell.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout repository
|
name: Checkout repository
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.2.2
|
||||||
-
|
-
|
||||||
name: Spell-Checking
|
name: Spell-Checking
|
||||||
uses: codespell-project/actions-codespell@master
|
uses: codespell-project/actions-codespell@master
|
||||||
|
|||||||
2
.github/workflows/editorconfig-checker.yml
vendored
2
.github/workflows/editorconfig-checker.yml
vendored
@@ -9,6 +9,6 @@ jobs:
|
|||||||
name: editorconfig-checker
|
name: editorconfig-checker
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.0
|
- uses: actions/checkout@v4.2.2
|
||||||
- uses: editorconfig-checker/action-editorconfig-checker@main # current tag v1.0.0 is really out-of-date
|
- uses: editorconfig-checker/action-editorconfig-checker@main # current tag v1.0.0 is really out-of-date
|
||||||
- run: editorconfig-checker
|
- run: editorconfig-checker
|
||||||
|
|||||||
2
.github/workflows/merge-conflict.yml
vendored
2
.github/workflows/merge-conflict.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check if PRs are have merge conflicts
|
- name: Check if PRs are have merge conflicts
|
||||||
uses: eps1lon/actions-label-merge-conflict@v2.1.0
|
uses: eps1lon/actions-label-merge-conflict@v3.0.3
|
||||||
with:
|
with:
|
||||||
dirtyLabel: "Merge Conflict"
|
dirtyLabel: "Merge Conflict"
|
||||||
repoToken: "${{ secrets.GITHUB_TOKEN }}"
|
repoToken: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
|||||||
4
.github/workflows/stale.yml
vendored
4
.github/workflows/stale.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v8.0.0
|
- uses: actions/stale@v9.1.0
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
days-before-stale: 30
|
days-before-stale: 30
|
||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.2.2
|
||||||
- name: Remove 'stale' label
|
- name: Remove 'stale' label
|
||||||
run: gh issue edit ${{ github.event.issue.number }} --remove-label ${{ env.stale_label }}
|
run: gh issue edit ${{ github.event.issue.number }} --remove-label ${{ env.stale_label }}
|
||||||
env:
|
env:
|
||||||
|
|||||||
2
.github/workflows/stale_pr.yml
vendored
2
.github/workflows/stale_pr.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v8.0.0
|
- uses: actions/stale@v9.1.0
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Do not automatically mark PR/issue as stale
|
# Do not automatically mark PR/issue as stale
|
||||||
|
|||||||
2
.github/workflows/sync-back-to-dev.yml
vendored
2
.github/workflows/sync-back-to-dev.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
name: Syncing branches
|
name: Syncing branches
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.2.2
|
||||||
- name: Opening pull request
|
- name: Opening pull request
|
||||||
run: gh pr create -B development -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'Internal'
|
run: gh pr create -B development -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'Internal'
|
||||||
env:
|
env:
|
||||||
|
|||||||
3
.github/workflows/version_bump.yml
vendored
3
.github/workflows/version_bump.yml
vendored
@@ -17,9 +17,10 @@ jobs:
|
|||||||
LATEST_TAG=$(gh -R $REPO release list -L 1 | awk '{printf $3}')
|
LATEST_TAG=$(gh -R $REPO release list -L 1 | awk '{printf $3}')
|
||||||
echo "Latest version tag for releases in $REPO is $LATEST_TAG"
|
echo "Latest version tag for releases in $REPO is $LATEST_TAG"
|
||||||
echo "latest_tag=$LATEST_TAG" >> $GITHUB_ENV
|
echo "latest_tag=$LATEST_TAG" >> $GITHUB_ENV
|
||||||
|
[[ -z ${LATEST_TAG} ]] && echo "Error: LATEST_TAG is empty, aborting" && exit 1
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4.1.0
|
uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
ref: 'development'
|
ref: 'development'
|
||||||
|
|
||||||
|
|||||||
192
README.md
192
README.md
@@ -7,68 +7,172 @@ PADD (formerly Chronometer2) is a more expansive version of the original chronom
|
|||||||
***Note:** PADD has been adopted by the Pi-hole team, thanks to JPMCK for creating this helpful tool!
|
***Note:** PADD has been adopted by the Pi-hole team, thanks to JPMCK for creating this helpful tool!
|
||||||
|
|
||||||
## Setup PADD
|
## Setup PADD
|
||||||
*More in-depth information about setting up PADD can be found in this repo’s [wiki](https://github.com/pi-hole/PADD/wiki/Setup).*
|
|
||||||
|
|
||||||
- Get a copy of PADD by running:
|
- Get a copy of PADD by running:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~
|
cd ~
|
||||||
wget -O padd.sh https://install.padd.sh
|
wget -O padd.sh https://install.padd.sh
|
||||||
```
|
```
|
||||||
or
|
|
||||||
```bash
|
or
|
||||||
cd ~
|
|
||||||
curl -sSL https://install.padd.sh -o padd.sh
|
```bash
|
||||||
```
|
cd ~
|
||||||
|
curl -sSL https://install.padd.sh -o padd.sh
|
||||||
|
```
|
||||||
|
|
||||||
- Make PADD executable by running
|
- Make PADD executable by running
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo chmod +x padd.sh
|
sudo chmod +x padd.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
- Set PADD to auto run by adding the following to the end of `~/.bashrc`:
|
## Using PADD
|
||||||
|
|
||||||
```bash
|
### PADD on Pi-hole machine
|
||||||
# Run PADD
|
|
||||||
# If we’re on the PiTFT screen (ssh is xterm)
|
|
||||||
if [ "$TERM" == "linux" ] ; then
|
|
||||||
while :
|
|
||||||
do
|
|
||||||
./padd.sh
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
```
|
|
||||||
|
|
||||||
One line version
|
- Just run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~ ; echo "if [ \"\$TERM\" == \"linux\" ] ; then\n while :\n do\n ./padd.sh\n sleep 1\n done\nfi" | tee ~/.bashrc -a
|
./padd.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
- Reboot your Pi-Hole by running `sudo reboot`. PADD should now run when your Pi-Hole has completed booting.
|
### PADD from other machine
|
||||||
|
|
||||||
|
With PADD v4.0.0 and Pi-hole v6 it is also possible to run PADD from a machine that is not running Pi-hole
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./padd.sh --server <DOMAIN|IP>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Authentication
|
||||||
|
|
||||||
|
Pi-hole v6 uses a completely new API with a new authentication mechanism
|
||||||
|
|
||||||
|
If you run PADD on the same machine as Pi-hole, it's possible to bypass authentication when your local user is member of the `pihole` group (specifically, if you can access `/etc/pihole/cli_pw).
|
||||||
|
For details see [https://github.com/pi-hole/FTL/pull/1999](https://github.com/pi-hole/FTL/pull/1999)
|
||||||
|
|
||||||
|
If this is not the case, PADD will ask you for your password and (if configured) your two factor authentication token. You can also pass those as arguments
|
||||||
|
|
||||||
|
- password only
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./padd.sh --secret <password>
|
||||||
|
```
|
||||||
|
|
||||||
|
- with 2FA enabled
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./padd.sh --secret <password> --2fa <2fa>
|
||||||
|
```
|
||||||
|
|
||||||
|
### PADD with Pi-hole in a Docker Container
|
||||||
|
|
||||||
|
- If you're running Pi-hole in the official Docker Container, `padd.sh` is pre-installed and named `padd`. It can be used with the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec -it <container_name> padd [padd_options]
|
||||||
|
```
|
||||||
|
|
||||||
|
### PADD on PiTFT screen
|
||||||
|
|
||||||
|
_Instructions for how to setup PiTFT screen can be found [here](https://learn.adafruit.com/adafruit-pitft-3-dot-5-touch-screen-for-raspberry-pi/easy-install-2)_
|
||||||
|
|
||||||
|
- Set PADD to auto run on the PiTFT screen by adding the following to the end of `~/.bashrc`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run PADD
|
||||||
|
# If we’re on the PiTFT screen (ssh is xterm)
|
||||||
|
if [ "$TERM" == "linux" ] ; then
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
./padd.sh
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
```
|
||||||
|
|
||||||
|
One line version
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ~ ; echo "if [ \"\$TERM\" == \"linux\" ] ; then\n while :\n do\n ./padd.sh\n sleep 1\n done\nfi" | tee ~/.bashrc -a
|
||||||
|
```
|
||||||
|
|
||||||
|
- Reboot your Pi-Hole by running `sudo reboot`. PADD should now run on PiTFT Screen when your Pi-Hole has completed booting.
|
||||||
|
|
||||||
|
#### (Optional) Put the PiTFT Display to Sleep at Night
|
||||||
|
|
||||||
|
_If you don't want your PiTFT on all night when you are asleep, you can put it to sleep! (Note: **these instructions only apply to a PiTFT**.)_
|
||||||
|
|
||||||
|
- To do so, edit cron as root (`sudo crontab -e`) and add the following:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# PiTFT+ SLEEPY TIME
|
||||||
|
# Turn off the PiTFT+ at midnight
|
||||||
|
00 00 * * * sh -c 'echo "0" > /sys/class/backlight/soc\:backlight/brightness'
|
||||||
|
# Turn on the PiTFT+ at 8:00 am
|
||||||
|
00 08 * * * sh -c 'echo "1" > /sys/class/backlight/soc\:backlight/brightness'
|
||||||
|
```
|
||||||
|
|
||||||
## Updating PADD
|
## Updating PADD
|
||||||
|
|
||||||
- Simply run
|
- Simply run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./padd.sh -u
|
./padd.sh -u
|
||||||
```
|
```
|
||||||
|
|
||||||
- or run the same commands you used to install
|
- or run the same commands you used to install
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ~
|
||||||
|
wget -O padd.sh https://install.padd.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ~
|
||||||
|
curl -sSL https://install.padd.sh -o padd.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Sizes
|
||||||
|
|
||||||
|
PADD will display on screens that anywhere from 20x10 characters to over 80x26 characters.
|
||||||
|
|
||||||
|
As your screen gets smaller, you’ll be presented with less information… however, you’ll always get the most important details:
|
||||||
|
|
||||||
|
- The status of your Pi-hole (is it online, in need of an update?),
|
||||||
|
- How many ads have been blocked,
|
||||||
|
- Your hostname and IP, and
|
||||||
|
- Your CPU’s current load.
|
||||||
|
|
||||||
|
It will also run in the following modes (shown further below):
|
||||||
|
|
||||||
|
- Pico: 20x10 characters
|
||||||
|
- Nano: 24x12 characters
|
||||||
|
- Micro: 30x16 characters
|
||||||
|
- Mini: 40x18 characters
|
||||||
|
- Tiny: 53x20 characters
|
||||||
|
- Slim: 60x21 characters
|
||||||
|
- Regular: 60x22 characters (takes up the entire screen on a 3.5" Adafruit PiTFT using the Terminal font at 8x14.)
|
||||||
|
- Mega: 80x26 characters
|
||||||
|
|
||||||
|
### Sizing Your PADD
|
||||||
|
|
||||||
|
How PADD will display on your screen depends on the size of the screen in _characters_, not _pixels_! PADD doesn’t care if it is running on a 5k Retina display on your $5,000 iMac Pro or on a $5 display you bought on eBay.
|
||||||
|
|
||||||
|
If you want to change how PADD displays on a small display attached to your Raspberry Pi, use
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~
|
sudo dpkg-reconfigure console-setup
|
||||||
wget -O padd.sh https://install.padd.sh
|
|
||||||
```
|
|
||||||
```bash
|
|
||||||
cd ~
|
|
||||||
curl -sSL https://install.padd.sh -o padd.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running Pi-hole in a Docker Container
|
to configure your font settings to an ideal size for you.
|
||||||
If you're running Pi-hole in the official Docker Container, `padd.sh` is pre-installed and named `padd`. It can be used with the following command:
|
|
||||||
```bash
|
If you want to change how PADD displays through a terminal emulator (PuTTY, Terminal.app, iTerm2, etc.), resize your window or play with font sizes in your app of choice.
|
||||||
docker exec -it <container_name> padd [padd_options]
|
|
||||||
```
|
### The Sizes
|
||||||
|
|
||||||
|

|
||||||
|
|||||||
Reference in New Issue
Block a user