Pod uses an initializer or “launcher” to configure the system before running the main code. The launcher performs the following tasks before running the main program:
- Update & Upgrade the OS
- Sync Clock
- Installs program required packages
- Check for required files, create them if missing
- Configure start on boot file
- Creates serial if needed
- Registers the Pod with the API server
- Initializes the main program under /opt/
To launch the software, when the device boots, the launcher configures the system first to run the software in the background and then creates a script that executes the launch on startup. Working version with a cronjob.
(@reboot (cd /home/ubuntu/RecursionHub && sudo python3 HUB_Launcher.py &))