I have a website which requires several processes to be running (python, node, etc). I currently have a systemd service created so I can easily start and stop those processes. I created a start script which launches all of the processes I need as background processes (appending &
to the end of the command).
This prevents me from being able to make use of systemd's auto restart feature when something crashes since all of the processes are starting under a single script.
One potential solution I can think of would be to create a service for each process, and then link them all together by creating a master service which Requires
them. I'm not a fan of this because it means I need to create 4-5 services for every environment of this website I want to run.
Is there a way I can easily define a service that starts multiple processes and monitors each of them individually?