Fix rc.d(8) script to comply to our template and habits.

While here, fix the @extraunexec line; from sthen@

"seems sensible" sthen@
This commit is contained in:
ajacoutot 2016-12-31 15:25:18 +00:00
parent ffee570587
commit 8d4c49a9bd
3 changed files with 8 additions and 8 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.1.1.1 2016/12/21 12:51:56 landry Exp $
# $OpenBSD: Makefile,v 1.2 2016/12/31 15:25:18 ajacoutot Exp $
COMMENT= network event stream processing system
V= 0.2.12
DISTNAME= riemann-${V}
CATEGORIES= sysutils
REVISION= 0
HOMEPAGE= http://riemann.io

View File

@ -1,7 +1,7 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2016/12/21 12:51:56 landry Exp $
@comment $OpenBSD: PLIST,v 1.2 2016/12/31 15:25:18 ajacoutot Exp $
@newgroup _riemann:785
@newuser _riemann:785:_riemann:daemon:Riemann Account:/nonexistent:/sbin/nologin
@extraunexec rmdir -rf /var/log/riemann/*
@extraunexec rm -rf /var/log/riemann/*
bin/riemann
lib/riemann/
lib/riemann/riemann.jar

View File

@ -1,20 +1,19 @@
#!/bin/sh
#
# $OpenBSD: riemann.rc,v 1.1.1.1 2016/12/21 12:51:56 landry Exp $
# $OpenBSD: riemann.rc,v 1.2 2016/12/31 15:25:18 ajacoutot Exp $
daemon="${TRUEPREFIX}/bin/riemann"
daemon_user="_riemann"
daemon_log="${LOCALSTATEDIR}/log/riemann/riemann.log"
rc_bg=YES
. /etc/rc.d/rc.subr
java="$(${LOCALBASE}/bin/javaPathHelper -c clojure)"
pexp="${java}.*riemann.*"
rc_bg=YES
rc_start() {
(${rcexec} "JAVA_CMD=\"${java}\" ${daemon} > ${daemon_log} 2>&1") &
${rcexec} "JAVA_CMD=\"${java}\" ${daemon} ${_bg}"
}
rc_cmd $1