I use debian, same service
/usr/bin/something starts same daemon with different config file:
#!/bin/sh # veriables service1=on service9=on service45=on [...] /usr/bin/something /home/user/conf1/something /usr/bin/something /home/user/conf9/something /usr/bin/something /home/user/conf45/something
from command line I see with
user 123 0.0 0.0 0.0 pts/2 /usr/bin/something /home/user/conf1/something user 124 0.0 0.0 0.0 pts/2 /usr/bin/something /home/user/conf9/something user 125 0.0 0.0 0.0 pts/2 /usr/bin/something /home/user/conf45/something
Sometimes linux kills one these and I need to automatically restart. These services really are less or more 100 but does not consecutive, so I need to check with
ps which are not started and restart.
If os kills (e.g.)
user 123 0.0 0.0 0.0 pts/2 /usr/bin/something /home/user/conf1/something
the script should "scan" with
ps which daemons are off - in this case it is
only - and hence restart it.