Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Sep 2018 22:38:35 -0700
From:      Lee Brown <leeb@ratnaling.org>
To:        Matthew Seaman <matthew@freebsd.org>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Can't get pidfile to work in rc script
Message-ID:  <CAFPNf59t_=34ZZjvvErxuxJW4UHkqJS=CPS=09Geokpt8V-DrA@mail.gmail.com>
In-Reply-To: <06325ee3-e920-d924-4c37-1bff6ec1e2c6@FreeBSD.org>
References:  <CAFPNf59m3BGLiNxkWK%2Bo5TRa=CNmh4vTmv7PZBmMbhYaBdj5Vw@mail.gmail.com> <06325ee3-e920-d924-4c37-1bff6ec1e2c6@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 20, 2018, 10:06 PM Matthew Seaman <matthew@freebsd.org> wrote:

> On 21/09/2018 06:57, Lee Brown wrote:
> > I'm trying to get 2 separate sshd's running.  I've created
> > /etc/rc.d/sshd_alternate but it always uses /var/run/sshd.pid and not
> > /var/run/sshd_alternate.pid.  I tried
> >
> > sshd_alternate_pidfile="${pidfile}"
> > and
> > procname="sshd" / procname="/usr/sbin/sshd"
> >
> > to no avail.  Can somebody provide some assistance, I'm sure this is
> simple
> > but I just can't fathom it.
>
> Did you create /etc/ssh/sshd_config.alternate?  In there you'll need to
> at minimum configure sshd to use a different pidfile and to listen on
> alternate IPs / port numbers.  It's the pidfile setting in the config
> file that sshd will use -- the setting in the rc.d script just tell the
> rc system where it can read the daemon's PID in order to signal it.
>
> Then you'll need the alternate rc.d startup script which you already
> seem to have in hand.
>
>         Cheers,
>
>         Matthew
>
Thank you Matthew,

Yes a separate port and config as you correctly surmise.

My assumption was that the rc  framework created the pidfile.  I'm going to
re-read the rc.subr manpage tomorrow as I obviously misunderstood how it
works.

Thanks to all - lee

>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFPNf59t_=34ZZjvvErxuxJW4UHkqJS=CPS=09Geokpt8V-DrA>