systemd way to do this is to make the process "talk" when it is configured, for example, by opening a socket or sending a notification (or exiting the parent script). Which, of course, is not always easy, especially with third-party materials: |
You could do something inline like
ExecStart=/bin/bash -c '/bin/start_cassandra &; do_bash_loop_waiting_for_it_to_come_up_here'
or a script that does the same thing. Or put do_bash_loop_waiting_for_it_to_come_up_here in ExecStartPost
Or create a helper .service that waits for it to appear, so the helper service depends on cassandra and waits for it to start, then your other process may depend on the helper service.
(You may also need to increase TimeoutStartSec from the 90s by default)
source share