1.1 KiB
Homelab setup scripts
Everything is homebaked, because it's at my house!
Dependencies
- python 3, bash, and coreutils
Creating & running scripts
Every script has a directory inside scripts/
. They must be ran through the run.sh
script.
Usually scripts are checkpointed. Each checkpoint is a function beginning with _ch_
. It is then
collected and run by calling _run_checkpoints
. They will be run in alphabetical order and if
one fails, the script will stop execution. You can then make changes, or fix the issue externally,
and then run the script again. It will skip all successfully completed checkpoints.
_lib.sh
should always be imported at the start of the script. It contains all the helper functions.
See scripts/template
for an example.
Unattended?
Not really, but most steps should be automatic
Fully rerun a script
Remove run.checkpoints from the script root directory. This will reset the script's idempotency check. It is just a text file with names of checkpoints that have successfully completed. You can edit it to skip certain parts, or replay them.