fastnetmon: create /var/run/fastnetmon in the rc script

feedback/ok various including kn jca jasper
This commit is contained in:
sthen 2020-05-14 11:47:32 +00:00
parent 08a24b99ba
commit 8074deb923
3 changed files with 8 additions and 5 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.8 2020/04/26 20:18:58 cwen Exp $
# $OpenBSD: Makefile,v 1.9 2020/05/14 11:47:32 sthen Exp $
COMMENT = DDoS detector with multiple packet capture engines
GH_ACCOUNT = pavel-odintsov
GH_PROJECT = fastnetmon
GH_TAGNAME = v1.1.4
REVISION = 0
REVISION = 1
HOMEPAGE = https://fastnetmon.com/guides/

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.2 2018/09/04 12:46:17 espie Exp $
@comment $OpenBSD: PLIST,v 1.3 2020/05/14 11:47:32 sthen Exp $
@newgroup _fastnetmon:814
@newuser _fastnetmon:814:_fastnetmon:daemon:FastNetMon User:/nonexistent:/sbin/nologin
@extraunexec rm -rf /var/log/fastnetmon/*
@ -28,6 +28,5 @@ share/examples/fastnetmon/reformat_code_with_clang_format.sh
share/examples/fastnetmon/reset_redis_stats
@owner _fastnetmon
@group _fastnetmon
@sample /var/run/fastnetmon/
@sample /var/log/fastnetmon/
@sample /var/log/fastnetmon_attacks/

View File

@ -1,10 +1,14 @@
#!/bin/ksh
#
# $OpenBSD: fastnetmon.rc,v 1.2 2018/07/11 15:24:56 ajacoutot Exp $
# $OpenBSD: fastnetmon.rc,v 1.3 2020/05/14 11:47:32 sthen Exp $
daemon="${TRUEPREFIX}/sbin/fastnetmon --daemonize"
daemon_user="_fastnetmon"
. /etc/rc.d/rc.subr
rc_pre() {
install -d -m 750 -o ${daemon_user} /var/run/fastnetmon
}
rc_cmd $1