write pid into /var/run/monitord.pid, so it can be killed