You are here
I have a pi-hole server on my network and had to build it. I thought it would be nice to have one already pre-built for use on a VM. For the one I currently have I started with TurnKey Core and installed PI-hole from there. What if you could download one ready to configuration and configuration took place during the initial deployment of the VM. So help me think this through, should we start with TurnKey Core and a bash script. TurnKey Core contains "curl" so in order to get the latest Pi-Hole version we shall invoke a script that first updates all of our operating system
apt update && sudo apt upgrade -y
then removes any obsolete dependencies
apt autoremove -y
now a script to get the latest release of Pi-Hole and install
curl -sSL www.install.pi-hole.net | bash
this address has its own bash script for installing and configuring Pi-Hole.
at the end of the configuration Pi-Hole would be up and running.
Is this just a matter of creating the script and implementing it into the intial install script and if so how do I attach this script?
Thank You
Have you seen TKLDev?
TKLDev is our "build tool in a box" and is what we build all appliances on.
if you look at the core build code, you'll see it's pretty simple. Any additional packages you want/need installed, go in the plan, any files you want to include, go in the overlay (relative to '/') and anything you want to script can go in a conf script (must be able to run unattended.
As for what needs to be (re)configured on firstboot. We have a framework to support that called inithooks. On firstboot all the firstboot.d scripts run (in alphanumeric order). Your appropriately named executable script(s) can be dropped in the overlay - /overlay/usr/lib/inithooks/firstboot.d/. E.g. our Laravel appliance.
I hope that gives you some food for thought. Have a poke around and see what you think. Feel free to ask questions...
Add new comment