using domoticz as Synology package. I also have monit installed with the following config
Code: Select all
#check domoticz is running
check process domoticz with pidfile /usr/local/domoticz/var/domoticz.pid
start program = "/var/packages/domoticz/scripts/start-stop-status start"
stop program = "/var/packages/domoticz/scripts/start-stop-status stop"
if failed host localhost port 8084 then restart
if 3 restarts within 5 cycles then timeout
if memory > 110 MB then restart
#done
Code: Select all
cp /usr/local/domoticz/var/domoticz.log /volume1/public/domoticz$Y$M$D$H$M.logHow can i copy the logfile just before domoticz start? Should i place the cp command in domoticz start-stop-status script, or is there a way to put it in monit config?
Thanks...