Use different pid file for second daemon?
From: Dale Dellutri (ddelQQQlutr_at_panQQQix.com)
Date: 10/28/03
- Next message: Paul Hink: "Re: Use different pid file for second daemon?"
- Previous message: gdev399: "Re: Secure file transfer from unix to windows"
- Next in thread: Paul Hink: "Re: Use different pid file for second daemon?"
- Reply: Paul Hink: "Re: Use different pid file for second daemon?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 28 Oct 2003 19:10:23 +0000 (UTC)
Is there any way to change the pid file that sshd uses when it starts?
My first sshd daemon listens to the internal network port, and I need
to run a second sshd daemon listening to the external network port and
be able to control it separately from the first. I wanted to set it
up as a service under RH9 using a different name. Unfortunately, the
man for sshd specifically says that the pid file:
/var/run/sshd.pid
Contains the process ID of the sshd listening for connections (if
there are several daemons running concurrently for different
ports, this contains the process ID of the one started last).
There does not seem to be an option to change this.
This causes a problem because to stop the original sshd process, root
would usually invoke:
service sshd stop
but this uses /etc/init.d/sshd, and the stop portion of the script
uses the pid found in the pid file to stop the process (which would be
the second one only).
How can I get the second daemon to use a different pid file without
rebuilding sshd from source? (And I don't even know how to rebuild it
from source.) Would copying the sshd daemon to another name and
patching the new executable work (string /usr/sbin/sshd does show
/var/run/sshd.pid)?
-- Dale Dellutri <ddelQQQlutr@panQQQix.com> (lose the Q's)
- Next message: Paul Hink: "Re: Use different pid file for second daemon?"
- Previous message: gdev399: "Re: Secure file transfer from unix to windows"
- Next in thread: Paul Hink: "Re: Use different pid file for second daemon?"
- Reply: Paul Hink: "Re: Use different pid file for second daemon?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|