From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] suricata: Remove PID file on stop Date: Fri, 03 May 2019 10:52:16 +0200 Message-ID: <43E7D366-6622-424B-8301-FDC58BBCDB61@ipfire.org> In-Reply-To: <20190501150306.4230-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4730226027498963232==" List-Id: --===============4730226027498963232== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, I am okay with the patch, but... > On 1 May 2019, at 17:03, Stefan Schantl wrote: >=20 > Force the initscript to remove the PID file when calling "stop" section. >=20 > If suricata crashes during startup, the PID file still remains and the serv= ice > cannot be started anymore until the file has been deleted. >=20 > Now when calling "stop" or "restart" the PID file will be deleted and the s= ervice > can be used again. >=20 > Fixes #12067. >=20 > Signed-off-by: Stefan Schantl > --- > src/initscripts/system/suricata | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/src/initscripts/system/suricata b/src/initscripts/system/suric= ata > index c9f131fca..38b6a40d8 100644 > --- a/src/initscripts/system/suricata > +++ b/src/initscripts/system/suricata > @@ -171,6 +171,9 @@ case "$1" in > # Remove suricata control socket. =20 > rm /var/run/suricata/* >/dev/null 2>/dev/null >=20 > + # Trash remain pid file if still exists. > + rm -f $PID_FILE >/dev/null 2>/dev/null > + Please quote variables and use {} around them. I will soon start to reject any patches that do not follow that coding style. Best, -Michael > # Don't report returncode of rm if suricata was not started > exit 0 > ;; > --=20 > 2.20.1 >=20 --===============4730226027498963232==--