aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorPhilip M. Gollucci <pgollucci@FreeBSD.org>2012-03-23 01:53:44 +0800
committerPhilip M. Gollucci <pgollucci@FreeBSD.org>2012-03-23 01:53:44 +0800
commit51ad2120d15ab95bdfc8de6341675ff9eb688da2 (patch)
treecfa29e070e9abd423ec866b0af1bc31b1bac87e9 /sysutils
parent3b557cd427054860d754eb44b0e905abbb353fee (diff)
downloadfreebsd-ports-gnome-51ad2120d15ab95bdfc8de6341675ff9eb688da2.tar.gz
freebsd-ports-gnome-51ad2120d15ab95bdfc8de6341675ff9eb688da2.tar.zst
freebsd-ports-gnome-51ad2120d15ab95bdfc8de6341675ff9eb688da2.zip
The chef_client init script should set up the pidfile in
/var/run/chef-client.pid and instruct the chef-client process to write its PID to this file when daemonizing. Without a pidfile, the status and onestatus command fall back to process inspection. If chef is run with a resource defined to :stop the chef_client service, such as chef-client::cron, then the non-daemonized chef-client process effectivelly kills itself by running /usr/local/etc/rc.d/chef_client status and /usr/local/etc/rc.d/chef_stop. Run chef-client manually, then run /usr/local/etc/rc.d/chef_client onestatus. The status will report chef-client running with the PID of the manually invoked chef-client process. - Bump PORTREVISION Submitted by: Scott Sanders <ssanders@taximagic.com> (private e-mail) Approved by: maintainer (implicit) Feature safe: yes
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/rubygem-chef/Makefile1
-rw-r--r--sysutils/rubygem-chef/files/chef_client.in4
2 files changed, 4 insertions, 1 deletions
diff --git a/sysutils/rubygem-chef/Makefile b/sysutils/rubygem-chef/Makefile
index 3dc326376884..095e7567180d 100644
--- a/sysutils/rubygem-chef/Makefile
+++ b/sysutils/rubygem-chef/Makefile
@@ -7,6 +7,7 @@
PORTNAME= chef
PORTVERSION= 0.10.8
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= RG
diff --git a/sysutils/rubygem-chef/files/chef_client.in b/sysutils/rubygem-chef/files/chef_client.in
index fab7a1b09908..c8b3d476e49d 100644
--- a/sysutils/rubygem-chef/files/chef_client.in
+++ b/sysutils/rubygem-chef/files/chef_client.in
@@ -25,6 +25,7 @@ load_rc_config $name
: ${chef_client_splay="0"}
: ${chef_client_logfile="/var/log/chef-client.log"}
: ${chef_client_loglevel="info"}
+: ${chef_client_pidfile="/var/run/chef-client.pid"}
if [ -n "$chef_client_nodename" ]
then
@@ -42,7 +43,8 @@ fi
command="%%PREFIX%%/bin/chef-client"
command_interpreter="%%RUBY%%"
-chef_client_flags="-c ${chef_client_configfile} ${nodename}${server}-d -i ${chef_client_interval} -s ${chef_client_splay} -L ${chef_client_logfile} -l ${chef_client_loglevel}"
+pidfile=${chef_client_pidfile}
+chef_client_flags="-c ${chef_client_configfile} ${nodename}${server}-d -i ${chef_client_interval} -s ${chef_client_splay} -L ${chef_client_logfile} -l ${chef_client_loglevel} -P ${chef_client_pidfile}"
load_rc_config $name
run_rc_command "$1"