summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Thode <prometheanfire@gentoo.org>2012-12-09 21:57:11 +0000
committerMatthew Thode <prometheanfire@gentoo.org>2012-12-09 21:57:11 +0000
commit6b0b0402475e6f24ebd8a225370601db74b624ef (patch)
tree5b446472c137c9fb1fd70b08e1d905c8ec8c0c0a /sys-auth/keystone/files
parentAdd teyjus, fixes Bug 39631 - teyjus-1.0_beta33 (diff)
downloadgentoo-2-6b0b0402475e6f24ebd8a225370601db74b624ef.tar.gz
gentoo-2-6b0b0402475e6f24ebd8a225370601db74b624ef.tar.bz2
gentoo-2-6b0b0402475e6f24ebd8a225370601db74b624ef.zip
I didn't commit the files dir...
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 0x2471eb3e40ac5ac3)
Diffstat (limited to 'sys-auth/keystone/files')
-rw-r--r--sys-auth/keystone/files/keystone.confd2
-rw-r--r--sys-auth/keystone/files/keystone.initd53
2 files changed, 55 insertions, 0 deletions
diff --git a/sys-auth/keystone/files/keystone.confd b/sys-auth/keystone/files/keystone.confd
new file mode 100644
index 000000000000..7bc656505435
--- /dev/null
+++ b/sys-auth/keystone/files/keystone.confd
@@ -0,0 +1,2 @@
+CONFIG_FILE=/etc/keystone/keystone.conf
+PID_PATH=/var/run/keystone
diff --git a/sys-auth/keystone/files/keystone.initd b/sys-auth/keystone/files/keystone.initd
new file mode 100644
index 000000000000..1de2ff60d21f
--- /dev/null
+++ b/sys-auth/keystone/files/keystone.initd
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/keystone/files/keystone.initd,v 1.1 2012/12/09 21:57:11 prometheanfire Exp $
+
+depend() {
+ need net
+}
+
+BASENAME=$(echo $SVCNAME | cut -d '-' -f 1)
+
+checkconfig() {
+ if [ ! -r /etc/conf.d/$BASENAME ]; then
+ eerror "No keystone service confd file found: /etc/conf.d/$BASENAME)"
+ return 1
+ fi
+ . /etc/conf.d/$BASENAME
+
+ if [ ! -r ${CONFIG_FILE} ]; then
+ eerror "No keystone config file found: ${CONFIG_FILE})"
+ return 1
+ fi
+
+ return 0
+}
+
+
+start() {
+ checkconfig || return $?
+ . /etc/conf.d/$BASENAME
+
+ ebegin "Starting ${SVCNAME}"
+
+ start-stop-daemon --start --quiet --make-pidfile --pidfile "${PID_PATH}/${SVCNAME}.pid" \
+ --exec /usr/bin/${SVCNAME}-all --background -- --config-file=${CONFIG_FILE}
+
+ eend $? "Failed to start ${SVCNAME}"
+}
+
+stop() {
+ checkconfig || return $?
+ . /etc/conf.d/$BASENAME
+
+ ebegin "Stopping ${SVCNAME}"
+
+ start-stop-daemon --stop --pidfile "${PID_PATH}/${SVCNAME}.pid" \
+ --exec /usr/bin/${SVCNAME}-all
+ eend $? "Failed to stop ${SVCNAME}"
+}
+
+#restart() {
+#
+#}