Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I prevent more than one instance of DenyHosts from running?

DenyHosts instance running
0
Posted

How can I prevent more than one instance of DenyHosts from running?

0

DenyHosts v0.8.0 (and greater) uses the configuration parameter LOCK_FILE which should point to some unique path. When DenyHosts is run initially it will attempt to create this file and record it’s process id (pid). If it already exists, DenyHosts will exit indicating that DenyHosts is still running and the pid of the previous process. Upon exit, DenyHosts will delete the LOCK_FILE so that it will not interfere with other instances (such as another instance run from cron). In the event that something goes awry (or if you savagely killed the current DenyHosts process before it had a chance to delete the LOCK_FILE itself) there is a chance that the LOCK_FILE will not get deleted. If this occurs, you can manually clear the LOCK_FILE by invoking DenyHosts with the –unlock flag: $ denyhosts.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123