openbsd-ports/sysutils/ruby-puppet/pkg/puppetd.rc
ajacoutot 9a811ec508 XXX use pkill -9 in rc_stop for now; when puppetd is started then
stopped when puppetmasterd is not available it would fail to stop within
at least 60 seconds.

discussed with and ok robert@ (maintainer)
2012-01-18 14:47:04 +00:00

19 lines
399 B
Bash

#!/bin/sh
#
# $OpenBSD: puppetd.rc,v 1.2 2012/01/18 14:47:05 ajacoutot Exp $
daemon="${TRUEPREFIX}/sbin/puppetd"
. /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