diff options
| author | Mihai Prica <prica.mihai@gmail.com> | 2013-06-11 14:42:59 +0300 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-28 18:41:56 -0400 |
| commit | 58eea2640d062ed3b903bc45882db571f74270f0 (patch) | |
| tree | 6a4f359a8458aebf48eb28429a4958c956e0df11 /meta-openstack | |
| parent | 52cc0e1460c351d06fa68c912aca3445b7cbbe9b (diff) | |
| download | meta-cloud-services-58eea2640d062ed3b903bc45882db571f74270f0.tar.gz | |
qpid: added initscript
Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack')
| -rw-r--r-- | meta-openstack/recipes-extended/qpid/qpid/qpidd | 82 | ||||
| -rw-r--r-- | meta-openstack/recipes-extended/qpid/qpid_0.20.bb | 10 |
2 files changed, 90 insertions, 2 deletions
diff --git a/meta-openstack/recipes-extended/qpid/qpid/qpidd b/meta-openstack/recipes-extended/qpid/qpid/qpidd new file mode 100644 index 0000000..08709d9 --- /dev/null +++ b/meta-openstack/recipes-extended/qpid/qpid/qpidd | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # | ||
| 3 | # Licensed to the Apache Software Foundation (ASF) under one | ||
| 4 | # or more contributor license agreements. See the NOTICE file | ||
| 5 | # distributed with this work for additional information | ||
| 6 | # regarding copyright ownership. The ASF licenses this file | ||
| 7 | # to you under the Apache License, Version 2.0 (the | ||
| 8 | # "License"); you may not use this file except in compliance | ||
| 9 | # with the License. You may obtain a copy of the License at | ||
| 10 | # | ||
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
| 12 | # | ||
| 13 | # Unless required by applicable law or agreed to in writing, | ||
| 14 | # software distributed under the License is distributed on an | ||
| 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| 16 | # KIND, either express or implied. See the License for the | ||
| 17 | # specific language governing permissions and limitations | ||
| 18 | # under the License. | ||
| 19 | # | ||
| 20 | # | ||
| 21 | # qpidd Startup script for the Qpid messaging daemon. | ||
| 22 | # | ||
| 23 | ### BEGIN INIT INFO | ||
| 24 | # Provides: qpidd | ||
| 25 | # Required-Start: $local_fs | ||
| 26 | # Required-Stop: $local_fs | ||
| 27 | # Default-Start: 2 3 4 5 | ||
| 28 | # Default-Stop: 0 1 6 | ||
| 29 | # Short-Description: start or stop qpidd | ||
| 30 | # Description: Qpidd is an AMQP broker. It receives, stores, routes and forwards messages using the AMQP protcol. | ||
| 31 | ### END INIT INFO | ||
| 32 | |||
| 33 | DAEMON="qpidd" | ||
| 34 | |||
| 35 | start () | ||
| 36 | { | ||
| 37 | echo -n "Starting ${DAEMON}..." | ||
| 38 | if pidof ${DAEMON} > /dev/null; then | ||
| 39 | echo "already running." | ||
| 40 | exit 0 | ||
| 41 | fi | ||
| 42 | start-stop-daemon --start --quiet --background --exec ${DAEMON} | ||
| 43 | if [ $? -eq 0 ]; then | ||
| 44 | echo "done." | ||
| 45 | else | ||
| 46 | echo "failed." | ||
| 47 | fi | ||
| 48 | } | ||
| 49 | |||
| 50 | stop () | ||
| 51 | { | ||
| 52 | echo "Stopping ${DAEMON}..." | ||
| 53 | if ! pidof ${DAEMON} >/dev/null; then | ||
| 54 | echo "not running." | ||
| 55 | exit 0 | ||
| 56 | fi | ||
| 57 | start-stop-daemon --stop --quiet --exec ${DAEMON} | ||
| 58 | if [ $? -eq 0 ]; then | ||
| 59 | echo "done." | ||
| 60 | else | ||
| 61 | echo "failed." | ||
| 62 | fi | ||
| 63 | } | ||
| 64 | |||
| 65 | case "$1" in | ||
| 66 | start) | ||
| 67 | start | ||
| 68 | ;; | ||
| 69 | stop) | ||
| 70 | stop | ||
| 71 | ;; | ||
| 72 | restart|force-reload) | ||
| 73 | stop | ||
| 74 | start | ||
| 75 | ;; | ||
| 76 | *) | ||
| 77 | echo "Usage: $0 {start|stop|force-reload|restart}" | ||
| 78 | exit 1 | ||
| 79 | ;; | ||
| 80 | esac | ||
| 81 | |||
| 82 | exit 0 | ||
diff --git a/meta-openstack/recipes-extended/qpid/qpid_0.20.bb b/meta-openstack/recipes-extended/qpid/qpid_0.20.bb index 902462a..3cfd94b 100644 --- a/meta-openstack/recipes-extended/qpid/qpid_0.20.bb +++ b/meta-openstack/recipes-extended/qpid/qpid_0.20.bb | |||
| @@ -8,7 +8,8 @@ DEPENDS = "boost perl-native python " | |||
| 8 | PR = "r0" | 8 | PR = "r0" |
| 9 | 9 | ||
| 10 | SRC_URI = "http://mirror.nexcess.net/apache/${PN}/${PV}/qpid-cpp-0.20.tar.gz \ | 10 | SRC_URI = "http://mirror.nexcess.net/apache/${PN}/${PV}/qpid-cpp-0.20.tar.gz \ |
| 11 | file://quick-fix.patch" | 11 | file://quick-fix.patch \ |
| 12 | file://qpidd" | ||
| 12 | 13 | ||
| 13 | SRC_URI[md5sum] = "566132c5939ca31a32a0e80cc4124122" | 14 | SRC_URI[md5sum] = "566132c5939ca31a32a0e80cc4124122" |
| 14 | SRC_URI[sha256sum] = "31b80ba3c4773d288b4e6245e3b2048438386331d460f7a7b0794cbd200301de" | 15 | SRC_URI[sha256sum] = "31b80ba3c4773d288b4e6245e3b2048438386331d460f7a7b0794cbd200301de" |
| @@ -26,7 +27,12 @@ export PERL="${STAGING_BINDIR}/perl" | |||
| 26 | 27 | ||
| 27 | EXTRA_OECONF += " --without-help2man" | 28 | EXTRA_OECONF += " --without-help2man" |
| 28 | 29 | ||
| 29 | PACKAGES += "qmfgen qmfgen-python" | 30 | do_install_append() { |
| 31 | install -d ${D}${sysconfdir}/init.d | ||
| 32 | install -m 0755 ${WORKDIR}/qpidd ${D}${sysconfdir}/init.d/qpidd | ||
| 33 | } | ||
| 34 | |||
| 35 | PACKAGES += "qmfgen qmfgen-python qmfgen-python-dbg" | ||
| 30 | 36 | ||
| 31 | FILES_qmfgen = "${bindir}/qmf-gen" | 37 | FILES_qmfgen = "${bindir}/qmf-gen" |
| 32 | 38 | ||
