How can I prevent more than one instance of DenyHosts from running?
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
- Can I run csmsetupyast, csmsetupks, or csmsetupinstall while an install is running, or while another instance of csmsetupyast, csmsetupks, or csmsetupinstall is running?
- How can I get the workflow instance, not just the instance id, from inside the running workflow?
- How can I prevent more than one instance of DenyHosts from running?