From 03f9daa98bc5cdd4701a1bd373c0db903d5a9853 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 24 Jun 2021 19:50:43 +0200 Subject: [PATCH] change notify & release --- FAQ.md | 2 +- README.md | 2 +- build_sdcard.sh | 2 +- home.admin/_commands.sh | 5 +++++ home.admin/config.scripts/blitz.notify.sh | 8 ++++---- .../blitz.preparerelease.sh} | 0 .../blitz.sendnotification.py} | 0 7 files changed, 12 insertions(+), 7 deletions(-) rename home.admin/{XXprepareRelease.sh => config.scripts/blitz.preparerelease.sh} (100%) rename home.admin/{XXsendNotification.py => config.scripts/blitz.sendnotification.py} (100%) diff --git a/FAQ.md b/FAQ.md index f49ca5386..29803c837 100644 --- a/FAQ.md +++ b/FAQ.md @@ -541,7 +541,7 @@ Work notes for the process of producing a new SD card image release: * Run the following command BUT REPLACE `[BRANCH]` with the branch-string of your latest version * `wget --no-cache https://raw.githubusercontent.com/rootzoll/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh false true rootzoll [BRANCH] lcd true true` * Monitor/Check outputs for warnings/errors - install LCD -* Login new with `ssh admin@[IP-OF-RASPIBLITZ]` (pw: raspiblitz) and run `./XXprepareRelease.sh` +* Login new with `ssh admin@[IP-OF-RASPIBLITZ]` (pw: raspiblitz) and run `release` * Disconnect WiFi/LAN on build laptop (hardware switch off) and shutdown * Remove `Ubuntu LIVE` USB stick and cut power from the RaspberryPi * Connect USB stick with latest `TAILS` (make it stay offline) diff --git a/README.md b/README.md index 09702ba1e..9c3e5bf9e 100644 --- a/README.md +++ b/README.md @@ -1107,7 +1107,7 @@ Now you are ready to start the SD card build script (check the code to see if th As you can see from the URL, you can find the build script in this Git repo under `build_sdcard.sh`. You can check what gets installed and configured in detail. Feel free to post improvements as pull requests. -The whole build process takes a while. At the end the LCD drivers get installed and a reboot is needed. A user `admin` is created during the process. Remember the default password is now `raspiblitz`. You can login per SSH again - this time use admin: `ssh admin@[IP-OF-YOUR-RASPI]`. The install dialog of the RaspiBlitz schould automatically start. If you do not want to continue with the installation at this moment and use this sd card as a template for setting up multiple RaspiBlitzes, click `Cancel` and run `/home/admin/XXprepareRelease.sh`. Once you see the LCD going white and the activity LED of the pi starts going dark, you can unplug power and remove the SD card. You have now built your own RaspiBlitz SD card image. +The whole build process takes a while. At the end the LCD drivers get installed and a reboot is needed. A user `admin` is created during the process. Remember the default password is now `raspiblitz`. You can login per SSH again - this time use admin: `ssh admin@[IP-OF-YOUR-RASPI]`. The install dialog of the RaspiBlitz schould automatically start. If you do not want to continue with the installation at this moment and use this sd card as a template for setting up multiple RaspiBlitzes, click `Cancel` and run `release`. Once you see the LCD going white and the activity LED of the pi starts going dark, you can unplug power and remove the SD card. You have now built your own RaspiBlitz SD card image. *Note: If you plan to use your self-build sd card as a MASTER copy and distribute it: Use a smaller 8GB card for that. This way it's ensured that it will fit on every 16 GB card recommended for RaspiBlitz later on.* diff --git a/build_sdcard.sh b/build_sdcard.sh index 331684377..a515ec466 100755 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -1073,7 +1073,7 @@ echo "Take the chance & look thru the output above if you can spot any errors or echo "" echo "IMPORTANT IF WANT TO MAKE A RELEASE IMAGE FROM THIS BUILD:" echo "1. login fresh --> user:admin password:raspiblitz" -echo "2. run --> ./XXprepareRelease.sh" +echo "2. run --> release" echo "" # (do last - because might trigger reboot) diff --git a/home.admin/_commands.sh b/home.admin/_commands.sh index 6b36e642c..9ad496234 100755 --- a/home.admin/_commands.sh +++ b/home.admin/_commands.sh @@ -45,6 +45,11 @@ function check() { /home/admin/config.scripts/blitz.configcheck.py } +# command: release +function release() { + /home/admin/config.scripts/blitz.preparerelease.sh +} + # command: debug function debug() { cd /home/admin diff --git a/home.admin/config.scripts/blitz.notify.sh b/home.admin/config.scripts/blitz.notify.sh index d474641a5..9eb1616de 100755 --- a/home.admin/config.scripts/blitz.notify.sh +++ b/home.admin/config.scripts/blitz.notify.sh @@ -144,15 +144,15 @@ if [ "$1" = "send" ]; then # now parse settings from config and use to send the message if [ "${notifyMethod}" = "ext" ]; then - /usr/bin/python3 /home/admin/XXsendNotification.py ext ${notifyExtCmd} "$2" + /usr/bin/python3 /home/admin/config.scripts/blitz.sendnotification.py ext ${notifyExtCmd} "$2" elif [ "${notifyMethod}" = "mail" ]; then if [ "${notifyMailEncrypt}" = "on" ]; then - /usr/bin/python3 /home/admin/XXsendNotification.py mail --from-address "${notifyMailFromAddress}" --from-name "${notifyMailFromName}" --cert "${notifyMailToCert}" --encrypt ${notifyMailTo} "${@:3}" "$2" + /usr/bin/python3 /home/admin/config.scripts/blitz.sendnotification.py mail --from-address "${notifyMailFromAddress}" --from-name "${notifyMailFromName}" --cert "${notifyMailToCert}" --encrypt ${notifyMailTo} "${@:3}" "$2" else - /usr/bin/python3 /home/admin/XXsendNotification.py mail --from-address "${notifyMailFromAddress}" --from-name "${notifyMailFromName}" "${notifyMailTo}" "${@:3}" "$2" + /usr/bin/python3 /home/admin/config.scripts/blitz.sendnotification.py mail --from-address "${notifyMailFromAddress}" --from-name "${notifyMailFromName}" "${notifyMailTo}" "${@:3}" "$2" fi elif [ "${notifyMethod}" = "slack" ]; then - /usr/bin/python3 /home/admin/XXsendNotification.py slack -h "$2" + /usr/bin/python3 /home/admin/config.scripts/blitz.sendnotification.py slack -h "$2" else echo "unknown notification method - check /mnt/hdd/raspiblitz.conf" fi diff --git a/home.admin/XXprepareRelease.sh b/home.admin/config.scripts/blitz.preparerelease.sh similarity index 100% rename from home.admin/XXprepareRelease.sh rename to home.admin/config.scripts/blitz.preparerelease.sh diff --git a/home.admin/XXsendNotification.py b/home.admin/config.scripts/blitz.sendnotification.py similarity index 100% rename from home.admin/XXsendNotification.py rename to home.admin/config.scripts/blitz.sendnotification.py