As Thrillhouse already scripted, you need to take a pragmatic approach (which means that you need to check if the processes are running). That's because the OS tools will always report that the service is running if you started it, even if it segfaulted or died because of any problem.
EDITED: You can always use the OR operator || to launch the service if grep doesn't report it as running. For example:
Code:
ps -A | grep whatever || <launch whatever>
That will run a command if grep doesn't give an output (which means that the process is not running.