FreeBSD Bugzilla – Attachment 188145 Details for
Bug 223052
[PATCH] security/suricata: fix suricata stale pid file issue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
stale pid fix
suricata-pid.diff (text/plain), 1.81 KB, created by
Franco Fichtner
on 2017-11-20 21:26:29 UTC
(
hide
)
Description:
stale pid fix
Filename:
MIME Type:
Creator:
Franco Fichtner
Created:
2017-11-20 21:26:29 UTC
Size:
1.81 KB
patch
obsolete
>diff --git a/security/suricata/Makefile b/security/suricata/Makefile >index bf7a3cbc00d2..771ba6afdfa5 100644 >--- a/security/suricata/Makefile >+++ b/security/suricata/Makefile >@@ -3,6 +3,7 @@ > > PORTNAME= suricata > PORTVERSION= 4.0.0 >+PORTREVISION= 1 > CATEGORIES= security > MASTER_SITES= http://www.openinfosecfoundation.org/download/ > >diff --git a/security/suricata/files/suricata.in b/security/suricata/files/suricata.in >index d93a2f9fbfa3..7e1ef82d8ef8 100644 >--- a/security/suricata/files/suricata.in >+++ b/security/suricata/files/suricata.in >@@ -19,13 +19,17 @@ > # Default: 8000 > # suricata_netmap (str): Set to YES to enable netmap (Inline Mode) > # Default: NO >- >+# suricata_user (str): Set the user to run suricata as >+# Default: root >+# suricata_pidfile (str): Pidfile to store pid of suricata process >+# Default: /var/run/suricata.pid > > . /etc/rc.subr > > name="suricata" > rcvar=suricata_enable > >+start_precmd="suricata_prestart" > command="%%PREFIX%%/bin/suricata" > > load_rc_config $name >@@ -35,6 +39,8 @@ load_rc_config $name > [ -z "$suricata_flags" ] && suricata_flags="-D" > [ -z "$suricata_divertport" ] && suricata_divertport="8000" > [ -z "$suricata_netmap" ] && suricata_netmap="NO" >+[ -z "$suricata_user" ] && suricata_user="root" >+[ -z "$suricata_pidfile" ] && suricata_pidfile="/var/run/suricata.pid" > > if [ -n "$suricata_interface" ]; then > for interface in $suricata_interface; do >@@ -47,9 +53,16 @@ else > info "Inline Mode on divert port $suricata_divertport (suricata_interface not defined)" > fi > >-pidfile="/var/run/suricata.pid" >+pidfile=$suricata_pidfile > suricata_flags="$suricata_flags --pidfile $pidfile" > > [ -n "$suricata_conf" ] && suricata_flags="$suricata_flags -c $suricata_conf" > >+suricata_prestart() >+{ >+ if ! run_rc_command status > /dev/null; then >+ rm -f "$pidfile" >+ fi >+} >+ > run_rc_command "$1"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
franco
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 223052
:
187220
| 188145