I have monit able to watch the program but the start script is not working. The stop script works just fine.
The when monit tries to start it, it just says execution failed.
Monit part
check process tsdnsserver
matching "tsdnsserver"
start program = "/bin/bash -c '/root/ts3/tsdns/stop.sh'"
stop program = "/bin/bash -c '/root/ts3/tsdns/stop.sh'"
if failed port 41144 type tcp then restart
if 2 restarts within 3 cycles then timeout
Start Script
#!/bin/bash
screen -dmS tsdns ./tsdnsserver 41144
Stop Script
#!/bin/bash
screen -X -S tsdns kill