For the service daemon floyd, that needs the pinkd service up and running, add sv start pinkd to floyd’s run script, right after set -e.
#!/bin/sh set -e sv start pinkd exec floyd
When the pinkd service daemon crashes or is restarted for other reasons and the floyd daemon is unable to handle this, add sv hup floyd (or whatever the floyd daemon understands) to pinkd’s finish script to force its reload or restart.
#!/bin/sh sv hup floyd
If the pinkd service shall be stopped when the floyd service is stopped gracefully, add test "$1" != 0 || sv down pinkd to floyd’s finish script.
#!/bin/sh test "$1" != 0 || sv down pinkdOr vice versa.
Explore the sv program for more options.
For a mail service listening on localhost:25, this check script could be used
#!/bin/sh set -e exec nc -z localhost 25