I've just been getting back into BSD mgmt. (took time off because of kids) and I've been playing (just evaluating) with jail managers and building a few "templates and whatnot". Then I realized I didn't really give the built-in `jail.conf` method a good read (I initially glossed over the section in the handbook). So, I figured I'd also start on my 10,000 lines of shell script code and build a helper script for myself to create a jail with the `jail.conf` method. My script is pretty crude but it's feeling like I actually have a nice little script/concept that I can use for myself. My script certainly isn't bomb-proof by any stretch, but I tried to study/look at other examples and adopt from there. Warning: the script is not very "professional" (i.e., it's a bit of a monolithic mess).
As far as jail managers go so far, I like BSD Pot the best so, I've tried to emulate that template system. I thought this would allow me to grab scripts from here and there to build up some templates for different jails I will need. I'm starting with easy type jails for Plex/Emby but I want to build up a more complicated test for something like Nexcloud (http, database, etc.) but that's unrelated to the concept at this point (I think).
My simple scripts (NOTE: `make install` will install to $(HOME)/bin, use my simplistic `configure` to change that):
Reference:
BSD Pot: https://github.com/bsdpot/pot
As far as jail managers go so far, I like BSD Pot the best so, I've tried to emulate that template system. I thought this would allow me to grab scripts from here and there to build up some templates for different jails I will need. I'm starting with easy type jails for Plex/Emby but I want to build up a more complicated test for something like Nexcloud (http, database, etc.) but that's unrelated to the concept at this point (I think).
My simple scripts (NOTE: `make install` will install to $(HOME)/bin, use my simplistic `configure` to change that):
GitHub - JohnKaul/jcreate: Script to create a FreeBSD jail.conf style jail with setup script, mounts, copy-in abilities
Script to create a FreeBSD jail.conf style jail with setup script, mounts, copy-in abilities - JohnKaul/jcreate
github.com
Reference:
BSD Pot: https://github.com/bsdpot/pot