Add a @comment as to why _riak requires a valid homedir and shell.
Tweak rc.d(8) script: * no need for a bin var, we have daemon for that * set rc_reload and rc_usercheck to no * don't redirect to /dev/null * implement rc_check() using 'riak ping' with and ok jmatthew@ (maintainer)
This commit is contained in:
parent
2c8575a44e
commit
4ac8597733
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.2 2012/08/25 06:33:14 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.3 2012/08/28 05:46:41 ajacoutot Exp $
|
||||
|
||||
COMMENT= distributed data store
|
||||
DISTNAME= riak-1.2.0
|
||||
CATEGORIES= databases
|
||||
HOMEPAGE= http://basho.com/
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
|
||||
MAINTAINER= Jonathan Matthew <jmatthew@openbsd.org>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/08/24 07:26:30 jmatthew Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.2 2012/08/28 05:46:41 ajacoutot Exp $
|
||||
@comment riak uses sudo(8): homedir must exist and user must have a valid shell
|
||||
@newgroup _riak:702
|
||||
@newuser _riak:702:_riak:daemon:Riak daemon:/var/riak:/bin/sh
|
||||
%%SHARED%%
|
||||
|
@ -1,19 +1,25 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: riak.rc,v 1.1.1.1 2012/08/24 07:26:29 jmatthew Exp $
|
||||
# $OpenBSD: riak.rc,v 1.2 2012/08/28 05:46:41 ajacoutot Exp $
|
||||
|
||||
bin="${TRUEPREFIX}/sbin/riak"
|
||||
daemon="${TRUEPREFIX}/lib/riak/erts-5.9.1/bin/beam.smp"
|
||||
daemon="${TRUEPREFIX}/sbin/riak"
|
||||
daemon_user="_riak"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_reload=NO
|
||||
rc_usercheck=NO
|
||||
|
||||
rc_check() {
|
||||
${rcexec} "${daemon} ping"
|
||||
}
|
||||
|
||||
rc_start() {
|
||||
${rcexec} "${bin} start" >/dev/null
|
||||
${rcexec} "${daemon} start"
|
||||
}
|
||||
|
||||
rc_stop() {
|
||||
${rcexec} "${bin} stop" >/dev/null
|
||||
${rcexec} "${daemon} stop"
|
||||
}
|
||||
|
||||
rc_cmd $1
|
||||
|
Loading…
Reference in New Issue
Block a user