diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2010-07-04 10:15:11 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2010-07-04 10:15:11 +0000 |
commit | ade1359978fed508f9c7178fb01bcd862590189d (patch) | |
tree | 7c8a09fc8b16b1ca143277979337aeb17394d0b9 /app-admin/chef-server-api | |
parent | ppc64 stable wrt #326135 (diff) | |
download | historical-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-api')
-rw-r--r-- | app-admin/chef-server-api/ChangeLog | 6 | ||||
-rw-r--r-- | app-admin/chef-server-api/files/initd/chef-server-api | 13 |
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 |