I would like to know whether it is possible to add a delay between stop/start methods. This is mainly because it requires at least 10 secs delay to close all open socket connections and close the server socket gracefully to start again.
This is my monit script
set logfile /var/log/monit.log
check process test.sh with pidfile /home/svcs/test/pid/app.pid
start program = "/etc/init.d/test.sh start" with timeout 60 seconds
stop program = "/etc/init.d/test.sh stop" with timeout 60 seconds
if failed host xx.xx.com port 443
type tcpSSL protocol http with timeout 15 seconds retry 3 then restart
alert xx@xx.com
Thanks