#1346 add custom-installs.sh script

This commit is contained in:
rootzoll 2020-07-16 15:54:42 +02:00
parent aec2a5771e
commit 22cfdc88a3
3 changed files with 23 additions and 1 deletions

7
FAQ.md
View File

@ -1077,3 +1077,10 @@ It is currently considered completely fine to leave this field empty and not pro
The `acme.sh` script is installed in `/home/admin/.acme.sh/` - the configuration and the certificates are stored on the
external hard disk in `/mnt/hdd/app-data/letsencrypt`.
### How can I customize my RaspiBlitz or add other software?
The RaspiBlitz is your computer to experiment with. Feel free to add your own scripts, edit the system or install further software from the command line. Just keep in mind that after an update/recovery the RaspiBlitz starts with a fresh and clean operating system again. So all your editings and installs might be gone. To prevent this you should do the following:
- place own scripts and data that should survive an update/recovery into the `/mnt/hdd/app-data` directory
- put all install commands & modification of the system into the script `/mnt/hdd/app-data/custom-installs.sh` that will be started automatically on a recovery/update.

View File

@ -462,7 +462,15 @@ else
echo "Provisioning kindle-display - keep default" >> ${logFile}
fi
# custom install script from user
customInstallAvailable=$(sudo ls /mnt/hdd/app-data/custom-installs.sh 2>/dev/null | grep -c "custom-installs.sh")
if [ ${customInstallAvailable} -gt 0 ]; then
echo "Running the custom install script ..." >> ${logFile}
sudo /mnt/hdd/app-data/custom-installs.sh >> ${logFile}
else
echo "No custom install script ... adding the placeholder." >> ${logFile}
sudo cp /home/admin/assets/custom-installs.sh /mnt/hdd/app-data/custom-installs.sh
fi
# replay backup LND conf & tlscerts
# https://github.com/rootzoll/raspiblitz/issues/324

View File

@ -0,0 +1,7 @@
#!/bin/bash
# This script runs with sudo rights after an update/recovery from a fresh sd card.
# This is the place to put all the install commands, cronjobs or editing of system configs
# for your personal modifications of RaspiBlitz
echo "There are no custom user installs so far."