diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2012-12-20 10:00:31 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2012-12-20 10:00:31 +0000 |
commit | f7cc31ac6367a8f38c5bc3aee261ca89b78867da (patch) | |
tree | aed954489417705b6778fcdecbd88985b46f0b90 /app-admin/chef-server-api | |
parent | improve init script (diff) | |
download | gentoo-2-f7cc31ac6367a8f38c5bc3aee261ca89b78867da.tar.gz gentoo-2-f7cc31ac6367a8f38c5bc3aee261ca89b78867da.tar.bz2 gentoo-2-f7cc31ac6367a8f38c5bc3aee261ca89b78867da.zip |
improve init script
(Portage version: 2.2.0_alpha147/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'app-admin/chef-server-api')
-rw-r--r-- | app-admin/chef-server-api/ChangeLog | 5 | ||||
-rw-r--r-- | app-admin/chef-server-api/files/initd/chef-server-api | 11 |
2 files changed, 7 insertions, 9 deletions
diff --git a/app-admin/chef-server-api/ChangeLog b/app-admin/chef-server-api/ChangeLog index 95e95b5ab9f9..e9c644dccfec 100644 --- a/app-admin/chef-server-api/ChangeLog +++ b/app-admin/chef-server-api/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for app-admin/chef-server-api # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/chef-server-api/ChangeLog,v 1.14 2012/12/17 13:13:00 hollow Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/chef-server-api/ChangeLog,v 1.15 2012/12/20 10:00:31 hollow Exp $ + + 20 Dec 2012; Benedikt Böhm <hollow@gentoo.org> files/initd/chef-server-api: + improve init script *chef-server-api-10.16.2 (17 Dec 2012) 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 a297c8c1919e..297fc6895418 100644 --- a/app-admin/chef-server-api/files/initd/chef-server-api +++ b/app-admin/chef-server-api/files/initd/chef-server-api @@ -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" - 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} ${CHEF_SERVER_OPTS} > /dev/null |