I think you can put it into background at once. To do the exclusion you can lock $0. This way the daemon will just die when it is started when another copy of it is allready working. Just don't do it in the BEGIN block:
Never lock $0 inside of a BEGIN block.