# rc.d prevent multiple start?



## outofcoffee (Nov 15, 2013)

Hello,

I have a custom rc.d script to start a program. I run `service xxx start` to launch the program. However, if I run the command again it will launch a second instance of the program. I feel like there must be a simple way to prevent this, but I am having trouble finding it.

Thanks.


----------



## junovitch@ (Nov 15, 2013)

Can you post your script?


----------



## outofcoffee (Nov 15, 2013)

Nevermind, my fault! I forgot I implemented a custom `start_cmd` which did not check if the process is currently running.

All is good now.


----------

