diff --git a/dietpi/boot/Automation_Custom_Script.sh b/dietpi/boot/Automation_Custom_Script.sh new file mode 100644 index 0000000..412dc43 --- /dev/null +++ b/dietpi/boot/Automation_Custom_Script.sh @@ -0,0 +1 @@ +wget https://raw.githubusercontent.com/openoms/raspiblitz/raspiblitz-dev/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh raspiblitz-dev openoms \ No newline at end of file diff --git a/dietpi/dietpi.txt b/dietpi/boot/dietpi.txt similarity index 98% rename from dietpi/dietpi.txt rename to dietpi/boot/dietpi.txt index 04fe86c..12e9cd9 100644 --- a/dietpi/dietpi.txt +++ b/dietpi/boot/dietpi.txt @@ -68,6 +68,11 @@ AUTO_SETUP_GLOBAL_PASSWORD=dietpi #AUTO_SETUP_INSTALL_SOFTWARE_ID=23 #will install Desktop LXDE #AUTO_SETUP_INSTALL_SOFTWARE_ID=74 #will install LAMP webserver stack #AUTO_SETUP_INSTALL_SOFTWARE_ID=44 #will install Bittorrent transmission +# install fail2ban +AUTO_SETUP_INSTALL_SOFTWARE_ID=73 +# install openssh client +AUTO_SETUP_INSTALL_SOFTWARE_ID=0 + # DietPi-Software Choice System # SSH Server Selection: diff --git a/dietpi/install_on_DietPi.md b/dietpi/install_on_DietPi.md index cd7c67e..ee0c680 100644 --- a/dietpi/install_on_DietPi.md +++ b/dietpi/install_on_DietPi.md @@ -73,16 +73,34 @@ The setup continues as described in the RaspiBlitz setup [README.md](/README.md# ## Example of setting up a RaspiBlitz HDD to be copied to the ODroid: -![copy the blockchain from a HDD of a Raspiblitz](pictures/copy_hdd.png) +![c#opy the blockchain from a HDD of a Raspiblitz](pictures/copy_hdd.png) ![example setup](pictures/HDD_copy_example.jpg) -Useful commands for debugging: -`sudo tail -f /mnt/hdd/bitcoin/debug.log` - continuous monitoring -`sudo tail -n 100 /mnt/hdd/bitcoin/debug.log` - shows the last 100 lines -`sudo systemctl status lnd` -`sudo journalctl -f -u lnd` -`./home/admin/XXdebugLogs.sh` - on the raspiblitz -`lsblk` see the partitions -`tail -n1000 -f raspiblitz.log` - debug logs of bootstrap.sh - -Samsple dietpi.txt: https://github.com/Fourdee/DietPi/blob/master/dietpi.txt \ No newline at end of file +### Useful commands for debugging: +`tail -n1000 -f/var/tmp/dietpi/logs/dietpi-automation_custom_script.log` follow startup setup script log +`lsblk` see the partitions +`tail -n1000 -f raspiblitz.log` - debug logs of bootstrap.sh +`sudo tail -f /mnt/hdd/bitcoin/debug.log` - continuous monitoring +`sudo tail -n100 /mnt/hdd/bitcoin/debug.log` - shows the last 100 lines +`sudo systemctl status lnd` +`sudo journalctl -f -u lnd` +`./home/admin/XXdebugLogs.sh` - debug log collection on the raspiblitz + +### Automate installation with the dietpi.txt +Need to copy to SDcard /boot/dietpi.txt after burning the image with Etcher. +IMPORTANT: +- Modifications to /boot/dietpi.txt will not be preserved on reboot. +- Please ensure you edit from the DietPi-RAMdisk location: /DietPi/dietpi.txt +NB: This is intended for advanced users, unless you know what you are doing, do not edit this file. ease use the DietPi programs instead. +NB: Do not remove uncommented lines, as the items are scraped by DietPi programs, on demand. +DietPi-Automation settings, applied on the 1st boot of DietPi, ONCE +Sample: +https://github.com/Fourdee/DietPi/blob/master/dietpi.txt + + +### Custom Script (post-networking and post-DietPi install) +Runs after DietPi installation is completed +Allows you to automatically execute a custom script at the end of DietPi installation. +Option 1 = Copy your script to /boot/Automation_Custom_Script.sh and it will be executed automatically. +Option 2 = Host your script online, then use AUTO_SETUP_CUSTOM_SCRIPT_EXEC=http://myweb.com/myscript.sh, it will be downloaded and executed automatically. | 0=disabled +NB: Executed script log /var/tmp/dietpi/logs/dietpi-automation_custom_script.log