From d58f0abb50ca631b823d1cddca4d389334e1a4e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Feb 2023 10:56:53 +0000 Subject: [PATCH 01/15] Bump actions/checkout from 3.2.0 to 3.3.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.2.0...v3.3.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/version_bump.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/version_bump.yml b/.github/workflows/version_bump.yml index 7ef46501..369200e1 100644 --- a/.github/workflows/version_bump.yml +++ b/.github/workflows/version_bump.yml @@ -19,7 +19,7 @@ jobs: echo "latest_tag=$LATEST_TAG" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v3.3.0 with: ref: 'development' From 23646dd984e71515ecd50a1c9afac121826b6e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 11 Mar 2023 14:27:45 +0100 Subject: [PATCH 02/15] Add version function to PADD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- padd.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/padd.sh b/padd.sh index bbae894c..10431225 100755 --- a/padd.sh +++ b/padd.sh @@ -1195,6 +1195,23 @@ OutputJSON() { echo "{\"domains_being_blocked\":${domains_being_blocked_raw},\"dns_queries_today\":${dns_queries_today_raw},\"ads_blocked_today\":${ads_blocked_today_raw},\"ads_percentage_today\":${ads_percentage_today_raw},\"clients\": ${clients}}" } +ShowVersion() { + # source version file to check if $DOCKER_VERSION is set + . /etc/pihole/versions + GetPADDInformation + if [ -z "${padd_version_latest}" ]; then + padd_version_latest="N/A" + fi + if [ -n "${DOCKER_VERSION}" ]; then + # Check for latest Docker version + GetVersionInformation + printf "%s${clear_line}\n" " PADD version is ${padd_version}$ as part of Docker ${docker_version_heatmap}${DOCKER_VERSION}${reset_text} (Latest Docker: ${GITHUB_DOCKER_VERSION})" + version_info="Docker ${docker_version_heatmap}${DOCKER_VERSION}${reset_text}" + else + printf "%s${clear_line}\n" " PADD version is ${padd_version_heatmap}${padd_version}${reset_text} (Latest: ${padd_version_latest})" + fi +} + StartupRoutine(){ # Get config variables . /etc/pihole/setupVars.conf @@ -1384,7 +1401,6 @@ DisplayHelp() { ::: -h, --help display this help text EOM - exit 0 } CleanExit(){ @@ -1449,6 +1465,7 @@ while [ "$#" -gt 0 ]; do case "$1" in "-j" | "--json" ) OutputJSON; exit 0;; "-h" | "--help" ) DisplayHelp; exit 0;; + "-v" | "--version" ) ShowVersion; exit 0;; "-xoff" ) xOffset="$2"; xOffOrig="$2"; shift;; "-yoff" ) yOffset="$2"; yOffOrig="$2"; shift;; * ) DisplayHelp; exit 1;; From 64b95196711bda3cdb508f3eb0e8d3550d8c73d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 11 Mar 2023 20:14:26 +0100 Subject: [PATCH 03/15] Add version info to help output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- padd.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/padd.sh b/padd.sh index 10431225..a8921b37 100755 --- a/padd.sh +++ b/padd.sh @@ -1205,7 +1205,7 @@ ShowVersion() { if [ -n "${DOCKER_VERSION}" ]; then # Check for latest Docker version GetVersionInformation - printf "%s${clear_line}\n" " PADD version is ${padd_version}$ as part of Docker ${docker_version_heatmap}${DOCKER_VERSION}${reset_text} (Latest Docker: ${GITHUB_DOCKER_VERSION})" + printf "%s${clear_line}\n" " PADD version is ${padd_version} as part of Docker ${docker_version_heatmap}${DOCKER_VERSION}${reset_text} (Latest Docker: ${GITHUB_DOCKER_VERSION})" version_info="Docker ${docker_version_heatmap}${DOCKER_VERSION}${reset_text}" else printf "%s${clear_line}\n" " PADD version is ${padd_version_heatmap}${padd_version}${reset_text} (Latest: ${padd_version_latest})" @@ -1398,6 +1398,7 @@ DisplayHelp() { ::: -xoff [num] set the x-offset, reference is the upper left corner, disables auto-centering ::: -yoff [num] set the y-offset, reference is the upper left corner, disables auto-centering ::: -j, --json output stats as JSON formatted string and exit +::: -v, --version show PADD version info ::: -h, --help display this help text EOM From 1ff7c44662c65c231f4cacb698ac046b97410420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Wed, 22 Feb 2023 22:14:23 +0100 Subject: [PATCH 04/15] Check next temp sensor if current returned empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- padd.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/padd.sh b/padd.sh index a8921b37..5281d78a 100755 --- a/padd.sh +++ b/padd.sh @@ -163,11 +163,14 @@ GetSystemInformation() { # CPU temperature if [ -d "/sys/devices/platform/coretemp.0/hwmon/" ]; then cpu=$(cat "$(find /sys/devices/platform/coretemp.0/hwmon/ -maxdepth 2 -name "temp1_input" 2>/dev/null | head -1)") - elif [ -f /sys/class/thermal/thermal_zone0/temp ]; then + fi + if [ -z "${cpu}" ] && [ -f /sys/class/thermal/thermal_zone0/temp ]; then cpu=$(cat /sys/class/thermal/thermal_zone0/temp) - elif [ -f /sys/class/hwmon/hwmon0/temp1_input ]; then + fi + if [ -z "${cpu}" ] && [ -f /sys/class/hwmon/hwmon0/temp1_input ]; then cpu=$(cat /sys/class/hwmon/hwmon0/temp1_input) - else + fi + if [ -z "${cpu}" ]; then cpu=0 fi From 05cfda1db32f40e4ff950e8475fbabb56972c926 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Wed, 22 Feb 2023 19:22:01 -0300 Subject: [PATCH 05/15] Silencing the error message Signed-off-by: RD WebDesign --- padd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/padd.sh b/padd.sh index 5281d78a..16b8af1b 100755 --- a/padd.sh +++ b/padd.sh @@ -162,7 +162,7 @@ GetSystemInformation() { # CPU temperature if [ -d "/sys/devices/platform/coretemp.0/hwmon/" ]; then - cpu=$(cat "$(find /sys/devices/platform/coretemp.0/hwmon/ -maxdepth 2 -name "temp1_input" 2>/dev/null | head -1)") + cpu=$(cat "$(find /sys/devices/platform/coretemp.0/hwmon/ -maxdepth 2 -name "temp1_input" 2>/dev/null | head -1)" 2>/dev/null) fi if [ -z "${cpu}" ] && [ -f /sys/class/thermal/thermal_zone0/temp ]; then cpu=$(cat /sys/class/thermal/thermal_zone0/temp) From be36a22d8e6474ef95487539fc1b5d685b4acac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sun, 12 Mar 2023 22:59:43 +0100 Subject: [PATCH 06/15] Reset ftl_version_heatmap after use MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- padd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/padd.sh b/padd.sh index a8921b37..c47308e6 100755 --- a/padd.sh +++ b/padd.sh @@ -722,7 +722,7 @@ PrintLogo() { if [ -n "${DOCKER_VERSION}" ]; then version_info="Docker ${docker_version_heatmap}${DOCKER_VERSION}${reset_text}" else - version_info="Pi-hole® ${core_version_heatmap}${CORE_VERSION}${reset_text}, Web ${web_version_heatmap}${WEB_VERSION}${reset_text}, FTL ${ftl_version_heatmap}${FTL_VERSION}" + version_info="Pi-hole® ${core_version_heatmap}${CORE_VERSION}${reset_text}, Web ${web_version_heatmap}${WEB_VERSION}${reset_text}, FTL ${ftl_version_heatmap}${FTL_VERSION}${reset_text}" fi # Screen size checks @@ -755,7 +755,7 @@ PrintDashboard() { if [ -n "${DOCKER_VERSION}" ]; then version_info="Docker ${docker_version_heatmap}${DOCKER_VERSION}${reset_text}" else - version_info="Pi-hole® ${core_version_heatmap}${CORE_VERSION}${reset_text}, Web ${web_version_heatmap}${WEB_VERSION}${reset_text}, FTL ${ftl_version_heatmap}${FTL_VERSION}" + version_info="Pi-hole® ${core_version_heatmap}${CORE_VERSION}${reset_text}, Web ${web_version_heatmap}${WEB_VERSION}${reset_text}, FTL ${ftl_version_heatmap}${FTL_VERSION}${reset_text}" fi # Move cursor to (0,0). printf '\e[H' From acfc26aec1cfba5df7b43906386d3d5d6ba7d8ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Mar 2023 10:57:19 +0000 Subject: [PATCH 07/15] Bump actions/checkout from 3.3.0 to 3.4.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.3.0...v3.4.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/codespell.yml | 2 +- .github/workflows/editorconfig-checker.yml | 2 +- .github/workflows/sync-back-to-dev.yml | 2 +- .github/workflows/version_bump.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 84c2f49e..45a97f31 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.4.0 - name: Spell-Checking uses: codespell-project/actions-codespell@master diff --git a/.github/workflows/editorconfig-checker.yml b/.github/workflows/editorconfig-checker.yml index 63cafd38..b3caebc2 100644 --- a/.github/workflows/editorconfig-checker.yml +++ b/.github/workflows/editorconfig-checker.yml @@ -9,6 +9,6 @@ jobs: name: editorconfig-checker runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.3.0 + - uses: actions/checkout@v3.4.0 - uses: editorconfig-checker/action-editorconfig-checker@main # current tag v1.0.0 is really out-of-date - run: editorconfig-checker diff --git a/.github/workflows/sync-back-to-dev.yml b/.github/workflows/sync-back-to-dev.yml index 97f510c2..18d3ab98 100644 --- a/.github/workflows/sync-back-to-dev.yml +++ b/.github/workflows/sync-back-to-dev.yml @@ -11,7 +11,7 @@ jobs: name: Syncing branches steps: - name: Checkout - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.4.0 - 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' env: diff --git a/.github/workflows/version_bump.yml b/.github/workflows/version_bump.yml index 369200e1..a3835818 100644 --- a/.github/workflows/version_bump.yml +++ b/.github/workflows/version_bump.yml @@ -19,7 +19,7 @@ jobs: echo "latest_tag=$LATEST_TAG" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v3.3.0 + uses: actions/checkout@v3.4.0 with: ref: 'development' From 73a86c1940df10005cc597dfcf04d933c3d7d147 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Mar 2023 10:56:49 +0000 Subject: [PATCH 08/15] Bump actions/stale from 7.0.0 to 8.0.0 Bumps [actions/stale](https://github.com/actions/stale) from 7.0.0 to 8.0.0. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v7.0.0...v8.0.0) --- updated-dependencies: - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/stale.yml | 2 +- .github/workflows/stale_pr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index bfd9b8fc..ecee46bf 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -12,7 +12,7 @@ jobs: issues: write steps: - - uses: actions/stale@v7.0.0 + - uses: actions/stale@v8.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-stale: 30 diff --git a/.github/workflows/stale_pr.yml b/.github/workflows/stale_pr.yml index d9129c57..4a151100 100644 --- a/.github/workflows/stale_pr.yml +++ b/.github/workflows/stale_pr.yml @@ -17,7 +17,7 @@ jobs: pull-requests: write steps: - - uses: actions/stale@v7.0.0 + - uses: actions/stale@v8.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} # Do not automatically mark PR/issue as stale From 959681eab84d44f5d0030e129d89792017b95e9d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Mar 2023 10:56:53 +0000 Subject: [PATCH 09/15] Bump actions/checkout from 3.4.0 to 3.5.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.4.0...v3.5.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/codespell.yml | 2 +- .github/workflows/editorconfig-checker.yml | 2 +- .github/workflows/sync-back-to-dev.yml | 2 +- .github/workflows/version_bump.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 45a97f31..973c22c5 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3.4.0 + uses: actions/checkout@v3.5.0 - name: Spell-Checking uses: codespell-project/actions-codespell@master diff --git a/.github/workflows/editorconfig-checker.yml b/.github/workflows/editorconfig-checker.yml index b3caebc2..a4515346 100644 --- a/.github/workflows/editorconfig-checker.yml +++ b/.github/workflows/editorconfig-checker.yml @@ -9,6 +9,6 @@ jobs: name: editorconfig-checker runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.4.0 + - uses: actions/checkout@v3.5.0 - uses: editorconfig-checker/action-editorconfig-checker@main # current tag v1.0.0 is really out-of-date - run: editorconfig-checker diff --git a/.github/workflows/sync-back-to-dev.yml b/.github/workflows/sync-back-to-dev.yml index 18d3ab98..c425c0b5 100644 --- a/.github/workflows/sync-back-to-dev.yml +++ b/.github/workflows/sync-back-to-dev.yml @@ -11,7 +11,7 @@ jobs: name: Syncing branches steps: - name: Checkout - uses: actions/checkout@v3.4.0 + uses: actions/checkout@v3.5.0 - 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' env: diff --git a/.github/workflows/version_bump.yml b/.github/workflows/version_bump.yml index a3835818..50319cc2 100644 --- a/.github/workflows/version_bump.yml +++ b/.github/workflows/version_bump.yml @@ -19,7 +19,7 @@ jobs: echo "latest_tag=$LATEST_TAG" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v3.4.0 + uses: actions/checkout@v3.5.0 with: ref: 'development' From 5831d2c26b05a100cb3db360cd5c76c0d42f888d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 15 Apr 2023 10:57:10 +0000 Subject: [PATCH 10/15] Bump actions/checkout from 3.5.0 to 3.5.2 Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.5.0...v3.5.2) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/codespell.yml | 2 +- .github/workflows/editorconfig-checker.yml | 2 +- .github/workflows/sync-back-to-dev.yml | 2 +- .github/workflows/version_bump.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 973c22c5..620e5538 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3.5.0 + uses: actions/checkout@v3.5.2 - name: Spell-Checking uses: codespell-project/actions-codespell@master diff --git a/.github/workflows/editorconfig-checker.yml b/.github/workflows/editorconfig-checker.yml index a4515346..84021b43 100644 --- a/.github/workflows/editorconfig-checker.yml +++ b/.github/workflows/editorconfig-checker.yml @@ -9,6 +9,6 @@ jobs: name: editorconfig-checker runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.0 + - uses: actions/checkout@v3.5.2 - uses: editorconfig-checker/action-editorconfig-checker@main # current tag v1.0.0 is really out-of-date - run: editorconfig-checker diff --git a/.github/workflows/sync-back-to-dev.yml b/.github/workflows/sync-back-to-dev.yml index c425c0b5..f3bb1e47 100644 --- a/.github/workflows/sync-back-to-dev.yml +++ b/.github/workflows/sync-back-to-dev.yml @@ -11,7 +11,7 @@ jobs: name: Syncing branches steps: - name: Checkout - uses: actions/checkout@v3.5.0 + uses: actions/checkout@v3.5.2 - 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' env: diff --git a/.github/workflows/version_bump.yml b/.github/workflows/version_bump.yml index 50319cc2..388f6e31 100644 --- a/.github/workflows/version_bump.yml +++ b/.github/workflows/version_bump.yml @@ -19,7 +19,7 @@ jobs: echo "latest_tag=$LATEST_TAG" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v3.5.0 + uses: actions/checkout@v3.5.2 with: ref: 'development' From 15a17626d062cc4a5e6956e24bd4cc2527ac1f85 Mon Sep 17 00:00:00 2001 From: strangelookingnerd <49242855+strangelookingnerd@users.noreply.github.com> Date: Sat, 15 Apr 2023 18:50:25 +0200 Subject: [PATCH 11/15] Add update option --- README.md | 9 ++++++++- padd.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b98aab51..1e3fca97 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,14 @@ cd ~ ; echo "if [ \"\$TERM\" == \"linux\" ] ; then\n while :\n do\n ./padd. - Reboot your Pi-Hole by running `sudo reboot`. PADD should now run when your Pi-Hole has completed booting. ## Updating PADD -- Just run the same commands you used to install +- Simply run + +```bash +./padd.sh -u +``` + +- or run the same commands you used to install + ```bash cd ~ wget -O padd.sh https://install.padd.sh diff --git a/padd.sh b/padd.sh index 6ee5f984..18223fb8 100755 --- a/padd.sh +++ b/padd.sh @@ -1390,6 +1390,52 @@ NormalPADD() { done } +Update() { + # source version file to check if $DOCKER_VERSION is set + . /etc/pihole/versions + + if [ -n "${DOCKER_VERSION}" ]; then + echo "${check_box_info} Update is not supported for Docker" + exit 1 + fi + + GetPADDInformation + + if [ "${padd_out_of_date_flag}" = "true" ]; then + echo "${check_box_info} Updating PADD from ${padd_version} to ${padd_version_latest}" + + padd_script_path=$(realpath "$0") + + if which wget > /dev/null 2>&1; then + echo "${check_box_info} Downloading PADD update via wget ..." + if wget -qO "${padd_script_path}" https://install.padd.sh > /dev/null 2>&1; then + echo "${check_box_good} ... done. Restart PADD for the update to take effect" + else + echo "${check_box_bad} Cannot download PADD update via wget" + echo "${check_box_info} Go to https://install.padd.sh to download the update manually" + exit 1 + fi + elif which curl > /dev/null 2>&1; then + echo "${check_box_info} Downloading PADD update via curl ..." + if curl -sSL https://install.padd.sh -o "${padd_script_path}" > /dev/null 2>&1; then + echo "${check_box_good} ... done. Restart PADD for the update to take effect" + else + echo "${check_box_bad} Cannot download PADD update via curl" + echo "${check_box_info} Go to https://install.padd.sh to download the update manually" + exit 1 + fi + else + echo "${check_box_bad} Cannot download, neither wget nor curl are available" + echo "${check_box_info} Go to https://install.padd.sh to download the update manually" + exit 1 + fi + else + echo "${check_box_good} You are already using the latest PADD version ${padd_version}" + fi + + exit 0 +} + DisplayHelp() { cat << EOM @@ -1401,6 +1447,7 @@ DisplayHelp() { ::: -xoff [num] set the x-offset, reference is the upper left corner, disables auto-centering ::: -yoff [num] set the y-offset, reference is the upper left corner, disables auto-centering ::: -j, --json output stats as JSON formatted string and exit +::: -u, --update update to the latest version ::: -v, --version show PADD version info ::: -h, --help display this help text @@ -1468,6 +1515,7 @@ main(){ while [ "$#" -gt 0 ]; do case "$1" in "-j" | "--json" ) OutputJSON; exit 0;; + "-u" | "--update" ) Update;; "-h" | "--help" ) DisplayHelp; exit 0;; "-v" | "--version" ) ShowVersion; exit 0;; "-xoff" ) xOffset="$2"; xOffOrig="$2"; shift;; From 2f98812275837384e36f0b8872ed6d4eb60d7aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sat, 15 Apr 2023 10:34:17 +0200 Subject: [PATCH 12/15] Trigger stale workflow on issue comments to remove stale label immediately MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .github/workflows/stale.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index ecee46bf..3e3fccd1 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -4,6 +4,7 @@ on: schedule: - cron: "0 8 * * *" workflow_dispatch: + issue_comment: jobs: stale: From 2ab9842284da83d92c709b5f55b3872c36c78cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sun, 16 Apr 2023 19:02:11 +0200 Subject: [PATCH 13/15] Run seperate job to trigger removal on comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .github/workflows/stale.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 3e3fccd1..9b797ebd 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -2,12 +2,13 @@ name: Mark stale issues on: schedule: - - cron: "0 8 * * *" + - cron: '0 8 * * *' workflow_dispatch: issue_comment: jobs: - stale: + stale_action: + if: github.event_name != 'issue_comment' runs-on: ubuntu-latest permissions: issues: write @@ -24,3 +25,18 @@ jobs: exempt-all-issue-assignees: true operations-per-run: 300 close-issue-reason: "not_planned" + + remove_stale: # trigger "stale" removal immediately when stale issues are commented on + if: github.event_name == 'issue_comment' + permissions: + contents: read # for actions/checkout + issues: write # to edit issues label + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3.4.0 + - name: Remove 'stale' label + run: gh issue edit ${{ github.event.issue.number }} --remove-label 'stale' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + From 592e7e731321d427bf834f081f4a985539111099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Mon, 17 Apr 2023 20:57:22 +0200 Subject: [PATCH 14/15] Use env variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .github/workflows/stale.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 9b797ebd..24b3054c 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -6,6 +6,9 @@ on: workflow_dispatch: issue_comment: +env: + stale_label: stale + jobs: stale_action: if: github.event_name != 'issue_comment' @@ -20,7 +23,7 @@ jobs: days-before-stale: 30 days-before-close: 5 stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days." - stale-issue-label: "stale" + stale-issue-label: $stale_label exempt-issue-labels: "Bug, WIP, Fixed In Next Release, Internal, Never Stale" exempt-all-issue-assignees: true operations-per-run: 300 @@ -36,7 +39,7 @@ jobs: - name: Checkout uses: actions/checkout@v3.4.0 - name: Remove 'stale' label - run: gh issue edit ${{ github.event.issue.number }} --remove-label 'stale' + run: gh issue edit ${{ github.event.issue.number }} --remove-label $stale_label env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c402d77c8c938d5347e2e432282e4d1ad1be0c6e Mon Sep 17 00:00:00 2001 From: pralor-bot Date: Sat, 27 May 2023 21:27:28 +0000 Subject: [PATCH 15/15] Bump version to v3.11.0 --- padd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/padd.sh b/padd.sh index 18223fb8..0808602f 100755 --- a/padd.sh +++ b/padd.sh @@ -15,7 +15,7 @@ export LC_NUMERIC=C ############################################ VARIABLES ############################################# # VERSION -padd_version="v3.10.1" +padd_version="v3.11.0" # LastChecks LastCheckVersionInformation=$(date +%s)