openbsd-ports/sysutils/ruby-puppet/pkg/puppetd.rc
ajacoutot f2bf574479 Factorize a bit more since both ports version share a lot.
While here, fix the rc script to start the master instead of the client
and vice-versa.

ok robert@ (maintainer)
2013-03-13 14:35:38 +00:00

19 lines
402 B
Bash

#!/bin/sh
#
# $OpenBSD: puppetd.rc,v 1.5 2013/03/13 14:35:39 ajacoutot Exp $
daemon="${TRUEPREFIX}/bin/puppet agent"
. /etc/rc.d/rc.subr
pexp="${RUBY} ${daemon}${daemon_flags:+ ${daemon_flags}}"
rc_reload=NO
# XXX can't stop within a fair amount of time when puppetmasterd is unreachable;
# related to: http://projects.puppetlabs.com/issues/11360 ?
rc_stop() {
pkill -9 -f "^${pexp}"
}
rc_cmd $1