summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2012-12-20 10:01:29 +0000
committerBenedikt Boehm <hollow@gentoo.org>2012-12-20 10:01:29 +0000
commitd13e8318ee49d38b4862cb2ab2a2f8de0eb7e07b (patch)
tree8489b0286f2dc9d361c324dc3dc47e25f9d1ef0f /app-admin/chef-server-webui
parentStable for amd64, wrt bug #447338 (diff)
downloadgentoo-2-d13e8318ee49d38b4862cb2ab2a2f8de0eb7e07b.tar.gz
gentoo-2-d13e8318ee49d38b4862cb2ab2a2f8de0eb7e07b.tar.bz2
gentoo-2-d13e8318ee49d38b4862cb2ab2a2f8de0eb7e07b.zip
improve init script
(Portage version: 2.2.0_alpha147/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'app-admin/chef-server-webui')
-rw-r--r--app-admin/chef-server-webui/ChangeLog6
-rw-r--r--app-admin/chef-server-webui/files/initd/chef-server-webui11
2 files changed, 8 insertions, 9 deletions
diff --git a/app-admin/chef-server-webui/ChangeLog b/app-admin/chef-server-webui/ChangeLog
index 4835ba969bb3..faa6829a35d1 100644
--- a/app-admin/chef-server-webui/ChangeLog
+++ b/app-admin/chef-server-webui/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-admin/chef-server-webui
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/chef-server-webui/ChangeLog,v 1.13 2012/12/17 13:11:23 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/chef-server-webui/ChangeLog,v 1.14 2012/12/20 10:01:29 hollow Exp $
+
+ 20 Dec 2012; Benedikt Böhm <hollow@gentoo.org>
+ files/initd/chef-server-webui:
+ improve init script
*chef-server-webui-10.16.2 (17 Dec 2012)
diff --git a/app-admin/chef-server-webui/files/initd/chef-server-webui b/app-admin/chef-server-webui/files/initd/chef-server-webui
index 53449359dd9c..4f239b636647 100644
--- a/app-admin/chef-server-webui/files/initd/chef-server-webui
+++ b/app-admin/chef-server-webui/files/initd/chef-server-webui
@@ -15,18 +15,13 @@ CLUSTER_NODES=${CLUSTER_NODES:-1}
CHEF_USER=${CHEF_USER:-chef}
CHEF_GROUP=${CHEF_GROUP:-chef}
-CHEF_DIRS=( /etc/chef /var/lib/chef /var/log/chef /var/run/chef )
-
-fix_owners() {
- for i in ${CHEF_DIRS[@]} ${CONFIGFILE}; do
- chown ${CHEF_USER}:${CHEF_GROUP} ${i}
- done
- chmod 0600 ${CONFIGFILE}
+start_pre() {
+ checkpath -q -d -m 0750 -o ${user}:${group} /etc/chef /var/{lib,log,run}/chef
+ checkpath -q -f -m 0600 ${CONFIGFILE}
}
start() {
ebegin "Starting Chef server web interface"
- fix_owners
${CHEF_SERVER_WEBUI_BINARY} -d -P ${CHEF_SERVER_WEBUI_PIDFILE} --name \
chef-server-webui -C ${CONFIGFILE} -u ${CHEF_USER} -G ${CHEF_GROUP} \
-c ${CLUSTER_NODES} -L ${CHEF_SERVER_WEBUI_LOGFILE} ${CHEF_SERVER_WEBUI_OPTS} > /dev/null