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
commitfec4ae2150c80f3a60509938a8ad2fd05572823e (patch)
treee0e4cbdb0304fab55f117fb3f99e7e3e1c3bf2b9 /app-admin/chef-server-api
parentppc64 stable wrt #326135 (diff)
downloadgentoo-2-fec4ae2150c80f3a60509938a8ad2fd05572823e.tar.gz
gentoo-2-fec4ae2150c80f3a60509938a8ad2fd05572823e.tar.bz2
gentoo-2-fec4ae2150c80f3a60509938a8ad2fd05572823e.zip
fix init script to set config file owner and permissions too
(Portage version: 2.2_rc67/cvs/Linux i686)
Diffstat (limited to 'app-admin/chef-server-api')
-rw-r--r--app-admin/chef-server-api/ChangeLog6
-rw-r--r--app-admin/chef-server-api/files/initd/chef-server-api13
2 files changed, 11 insertions, 8 deletions
diff --git a/app-admin/chef-server-api/ChangeLog b/app-admin/chef-server-api/ChangeLog
index 8c10fe367cd1..bab609275e3a 100644
--- a/app-admin/chef-server-api/ChangeLog
+++ b/app-admin/chef-server-api/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-admin/chef-server-api
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/chef-server-api/ChangeLog,v 1.2 2010/07/03 13:00:42 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/chef-server-api/ChangeLog,v 1.3 2010/07/04 10:15:11 hollow Exp $
+
+ 04 Jul 2010; Benedikt Böhm <hollow@gentoo.org>
+ files/initd/chef-server-api:
+ fix init script to set config file owner and permissions too
03 Jul 2010; Benedikt Böhm <hollow@gentoo.org>
chef-server-api-0.9.6.ebuild:
diff --git a/app-admin/chef-server-api/files/initd/chef-server-api b/app-admin/chef-server-api/files/initd/chef-server-api
index 81b0dea916dc..c42b0e9ed923 100644
--- a/app-admin/chef-server-api/files/initd/chef-server-api
+++ b/app-admin/chef-server-api/files/initd/chef-server-api
@@ -15,19 +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}
+fix_owners() {
+ for i in ${CHEF_DIRS[@]} ${CONFIGFILE}; do
+ chown ${CHEF_USER}:${CHEF_GROUP} ${i}
done
+ chmod 0600 ${CONFIGFILE}
}
start() {
ebegin "Starting Chef server"
- fix_dir_owners
+ fix_owners
${CHEF_SERVER_BINARY} -d -P ${CHEF_SERVER_PIDFILE} -C ${CONFIGFILE} \
-u ${CHEF_USER} -G ${CHEF_GROUP} --name chef-server \
-c ${CLUSTER_NODES} -L ${CHEF_SERVER_LOGFILE} > /dev/null