If you’re looking to launch some program on boot, you should use a systemd script.
You can create the file
/etc/systemd/system/component.service with the following:
You mentioned your component requires networking, which is what the
After= lines guarantee.
Once you have the file in place you need to reload systemd with the command
sudo systemctl daemon-reload
To get it to automatically start on boot, run
sudo systemctl enable component.service
There are a number of commands you can run against the service with the format
sudo systemctl <command> component.service:
disable - stop the service from automatically starting on boot
start - start the service now
stop - stop the service now
restart - restart the service
status - see the current status of the service
You can also get a log of the programs output with the command
journalctl -u component.service
Be mindful that if your startup script exits (based on your question it doesn't seem to, but perhaps it does), you may need to use a "oneshot" service setup rather than the one listed above. Take a look at this existing SO post for the difference: https://stackoverflow.com/questions/39032100/what-is-the-difference-between-systemd-service-type-oneshot-and-simple
Hope this helps.