Thanks for the quick response.

Success!

this method worked : " if not sys.platform.startswith('freebsd') and os.access("/proc",
os.F_OK):
 to:
if False:
which will force the 2nd method to be used rather than relying on
/proc/PID."

Thanks again


From: Phil Schwartz <[EMAIL PROTECTED]>
To: Jeff Adkins <[EMAIL PROTECTED]>
CC: [email protected]
Subject: Re: [Denyhosts-user] Denyhosts is not running.... But it is :)
Date: Sun, 2 Jul 2006 06:43:37 -0700 (PDT)


Ensure that the DENYHOST_LOCK is the same in both your denyhosts.cfg and daemon-control. Assuming that is the case...

The daemon control script uses 2 methods for determining if the process is running. If you have a /proc directory it will attempt to retrieve this information from /proc/PID (where PID is the process id stored in DENYHOSTS_LOCK). Is this not applicable to Ubuntu?

It seems like you might have a /proc directory w/o the PID entry. This is similar to Debian. If this is the case, can you tell me what the following produces:

$ python
import sys ; sys.platform


The other method DenyHosts uses, if the /proc directory doesn't exist is to use the command "ps -p PID" to determine if the process is running. Does this command not work on your system?

If a process exists, ps -p does this:

$ ps -p 1
  PID TTY          TIME CMD
    1 ?        00:00:02 init

Otherwise:

$ ps -p 99999
  PID TTY          TIME CMD


In the meantime, if this method works for you you can change the line in daemon-control:

if not sys.platform.startswith('freebsd') and os.access("/proc", os.F_OK):

 to:

 if False:

which will force the 2nd method to be used rather than relying on /proc/PID.

Regards,

Phil


On Sun, 2 Jul 2006, Jeff Adkins wrote:

I believe I have set everything up correctly but when I run either the link in /etc/init.d or the daemon-control in /usr/local/share/denyhosts it does not detect that I have a running instance. A quick ps -afe | grep deny shows that I do. Other than this it is running correctly, I just can't use the delivered scripts to shut it down, check status or restart it.

I changed the DENYHOSTS_LOCK in daemon-control from its default (looking in subsys which is empty on my system) to:

DENYHOSTS_LOCK  = "/var/run/denyhosts.pid"

Any idea how I can help the script detect the running instance?

I am using Ubuntu 6.06 if that helps. Thanks in advance and fantastic piece of programming :).

Jeff

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/




--
Regards,

Phil Schwartz - http://www.phil-schwartz.com

Open Source Projects:
- DenyHosts: http://www.denyhosts.net
- Kodos: http://kodos.sourceforge.net
- ReleaseForge: http://releaseforge.sourceforge.net
- Scratchy: http://scratchy.sourceforge.net
- FAQtor: http://faqtor.sourceforge.net

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Denyhosts-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/denyhosts-user

Reply via email to