From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] suricata: Remove PID file on stop
Date: Fri, 03 May 2019 10:52:16 +0200 [thread overview]
Message-ID: <43E7D366-6622-424B-8301-FDC58BBCDB61@ipfire.org> (raw)
In-Reply-To: <20190501150306.4230-1-stefan.schantl@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]
Hello,
I am okay with the patch, but...
> On 1 May 2019, at 17:03, Stefan Schantl <stefan.schantl(a)ipfire.org> wrote:
>
> Force the initscript to remove the PID file when calling "stop" section.
>
> If suricata crashes during startup, the PID file still remains and the service
> cannot be started anymore until the file has been deleted.
>
> Now when calling "stop" or "restart" the PID file will be deleted and the service
> can be used again.
>
> Fixes #12067.
>
> Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
> ---
> src/initscripts/system/suricata | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/initscripts/system/suricata b/src/initscripts/system/suricata
> 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.
> rm /var/run/suricata/* >/dev/null 2>/dev/null
>
> + # 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
> ;;
> --
> 2.20.1
>
prev parent reply other threads:[~2019-05-03 8:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 15:03 Stefan Schantl
2019-05-03 8:52 ` Michael Tremer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43E7D366-6622-424B-8301-FDC58BBCDB61@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox