Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Sep 2018 08:04:42 +0300
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Can't get pidfile to work in rc script
Message-ID:  <06325ee3-e920-d924-4c37-1bff6ec1e2c6@FreeBSD.org>
In-Reply-To: <CAFPNf59m3BGLiNxkWK%2Bo5TRa=CNmh4vTmv7PZBmMbhYaBdj5Vw@mail.gmail.com>
References:  <CAFPNf59m3BGLiNxkWK%2Bo5TRa=CNmh4vTmv7PZBmMbhYaBdj5Vw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--RP9eDrLnNLV5flvccD39zw04LLfWMjItR
Content-Type: multipart/mixed; boundary="f80LwHv1gIHTbub7WhYUZdJhUC1ySbt7X";
 protected-headers="v1"
From: Matthew Seaman <matthew@FreeBSD.org>
To: freebsd-hackers@freebsd.org
Message-ID: <06325ee3-e920-d924-4c37-1bff6ec1e2c6@FreeBSD.org>
Subject: Re: Can't get pidfile to work in rc script
References: <CAFPNf59m3BGLiNxkWK+o5TRa=CNmh4vTmv7PZBmMbhYaBdj5Vw@mail.gmail.com>
In-Reply-To: <CAFPNf59m3BGLiNxkWK+o5TRa=CNmh4vTmv7PZBmMbhYaBdj5Vw@mail.gmail.com>

--f80LwHv1gIHTbub7WhYUZdJhUC1ySbt7X
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: quoted-printable

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
>=20
> sshd_alternate_pidfile=3D"${pidfile}"
> and
> procname=3D"sshd" / procname=3D"/usr/sbin/sshd"
>=20
> to no avail.  Can somebody provide some assistance, I'm sure this is si=
mple
> 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


--f80LwHv1gIHTbub7WhYUZdJhUC1ySbt7X--

--RP9eDrLnNLV5flvccD39zw04LLfWMjItR
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEGfFU7L8RLlBUTj8wAFE/EOCp5OcFAluke+pfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDE5
RjE1NEVDQkYxMTJFNTA1NDRFM0YzMDAwNTEzRjEwRTBBOUU0RTcACgkQAFE/EOCp
5OeSlg/+PHYKVE772kEfP+Oc2T91kZ/Mdp4Wzh1KpExbCW+pgoMJ4AmUn+1dnGiT
S6bhbdZiTs+xNWIgNo+DQyLZlDmhS6HNZTir0v/Jomn1aB1r3a32yZTx7ZhYUMvd
kkxDEKiNv+AifIimdYZbjXtB5fpUO3Lt4GovQhrVI4CXDvY9D8pd7RTYSCIony2e
1wvGNb7VtNfSu2PFARfou3DKijhnxuPlHDGLIfG67vvpfdhJ/ILYFek5P+390wlZ
efkRKsDgVb77bJRMVjGuoQs2x+cvZoK/UV2nkBanaggBgjz7zlygRUVMu7JrsOTV
5fGQFVnYWjeRcpGeY75eMgWEPvRnRk3Nik8gQ0Xjwqrc7ZUBLflgGSapK99fgumN
mQX9LhSF9163LsidgWEJVVpPXS+ovhz3IQAGq9YfO55EUKTssqE+DkERIoFevWfD
NfPlULhaaZMilItln64bjIYuhiRzxILQIiZY8Hb9/foqhXaoYzB+rTu3iF/xbQEJ
1++E4DUJAZ/Nb292EH4mvrWDGV1CujtahiaUSGv9u1tzhYqDgV/aeYd5CL+iHhQx
Z9mzwN+WyIPV9J1MoXS5MCyfduu4KQwfLELotO1wxD6IjJSdULwEu66W3kc9wzK4
2I4rMfaFRJsNjTUxQvQmQDudGKbl5S5NTBLocxluxD7sy19ac3Q=
=0SDT
-----END PGP SIGNATURE-----

--RP9eDrLnNLV5flvccD39zw04LLfWMjItR--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?06325ee3-e920-d924-4c37-1bff6ec1e2c6>