summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2010-07-04 10:15:11 +0000
committerBenedikt Boehm <hollow@gentoo.org>2010-07-04 10:15:11 +0000
commitade1359978fed508f9c7178fb01bcd862590189d (patch)
tree7c8a09fc8b16b1ca143277979337aeb17394d0b9 /app-admin/chef-server-webui
parentppc64 stable wrt #326135 (diff)
downloadhistorical-ade1359978fed508f9c7178fb01bcd862590189d.tar.gz
historical-ade1359978fed508f9c7178fb01bcd862590189d.tar.bz2
historical-ade1359978fed508f9c7178fb01bcd862590189d.zip
fix init script to set config file owner and permissions too
Package-Manager: portage-2.2_rc67/cvs/Linux i686
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-webui13
2 files changed, 12 insertions, 7 deletions
diff --git a/app-admin/chef-server-webui/ChangeLog b/app-admin/chef-server-webui/ChangeLog
index 6ee9a3241eee..31df9d484f75 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-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/chef-server-webui/ChangeLog,v 1.1 2010/07/03 12:47:24 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/chef-server-webui/ChangeLog,v 1.2 2010/07/04 10:13:57 hollow Exp $
+
+ 04 Jul 2010; Benedikt Böhm <hollow@gentoo.org>
+ files/initd/chef-server-webui:
+ fix init script to set config file owner and permissions too
*chef-server-webui-0.9.6 (03 Jul 2010)
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 369a4e179507..57886e3f25e5 100644
--- a/app-admin/chef-server-webui/files/initd/chef-server-webui
+++ b/app-admin/chef-server-webui/files/initd/chef-server-webui
@@ -15,17 +15,18 @@ CLUSTER_NODES=${CLUSTER_NODES:-1}
CHEF_USER=${CHEF_USER:-chef}
CHEF_GROUP=${CHEF_GROUP:-chef}
-# TODO: this could be nicer
-DEFAULT_CHEF_DIRS=( /etc/chef /var/lib/chef /var/log/chef /var/run/chef )
-CHEF_DIRS=( ${CHEF_DIRS[@]:-${DEFAULT_CHEF_DIRS[@]}} )
+CHEF_DIRS=( /etc/chef /var/lib/chef /var/log/chef /var/run/chef )
-fix_dir_owners() {
- for DIR in ${CHEF_DIRS[@]} ; do chown ${CHEF_USER}:${CHEF_GROUP} ${DIR} ; done
+fix_owners() {
+ for i in ${CHEF_DIRS[@]} ${CONFIGFILE}; do
+ chown ${CHEF_USER}:${CHEF_GROUP} ${i}
+ done
+ chmod 0600 ${CONFIGFILE}
}
start() {
ebegin "Starting Chef server web interface"
- fix_dir_owners
+ 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} > /dev/null