From 4f5218cb2a3ea461604b443fad173b631e517f1d Mon Sep 17 00:00:00 2001 From: Micha Glave Date: Mon, 11 Jul 2011 13:01:38 +0200 Subject: [PATCH] new lib pyrowl for http://prowlapp.com pushes messages to your iDevice. --- dev-python/pyrowl/Manifest | 2 ++ dev-python/pyrowl/pyrowl-20110221.ebuild | 32 ++++++++++++++++++++++++ net-analyzer/shinken/files/shinken.initd | 26 +++++++++++++------ 3 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 dev-python/pyrowl/Manifest create mode 100644 dev-python/pyrowl/pyrowl-20110221.ebuild diff --git a/dev-python/pyrowl/Manifest b/dev-python/pyrowl/Manifest new file mode 100644 index 0000000..e5f82c9 --- /dev/null +++ b/dev-python/pyrowl/Manifest @@ -0,0 +1,2 @@ +DIST babs-pyrowl-c5aed5d.tar.gz 4214 RMD160 f5d1bc827fd52e85c18c4b68cf393b17dbd28408 SHA1 118c4731fd6f995644672c1e8e9f77acc078d5be SHA256 4c77243143a12c8665d07ebeee56144bca27cbf6da7865bb2cf6db00420eb6df +EBUILD pyrowl-20110221.ebuild 652 RMD160 7b8539a26d3c84eee7377260747f04944b5344aa SHA1 9a2d94ca98c88c92a5dc4012d403baef0646add0 SHA256 d34635c5cbd29b1917bb8c9fd7be13daca648eedfa9d4a517b2065ee75911928 diff --git a/dev-python/pyrowl/pyrowl-20110221.ebuild b/dev-python/pyrowl/pyrowl-20110221.ebuild new file mode 100644 index 0000000..2b2f430 --- /dev/null +++ b/dev-python/pyrowl/pyrowl-20110221.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" + +inherit python + +DESCRIPTION="Python lib for prowl-api." +GITHUB_USER="babs" +GITHUB_TAG="c5aed5d" +HOMEPAGE="https://github.com/${GITHUB_USER}/${PN}" +SRC_URI="https://github.com/${GITHUB_USER}/${PN}/tarball/${GITHUB_TAG} -> +${GITHUB_USER}-${PN}-${GITHUB_TAG}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND="dev-lang/python" + +S=${WORKDIR}/${GITHUB_USER}-${PN}-${GITHUB_TAG} + +src_prepare() { + python_convert_shebangs -r 2 . +} + +src_install() { + insinto "$(python_get_sitedir)/${PN}" + doins ${PN}/*.py +} diff --git a/net-analyzer/shinken/files/shinken.initd b/net-analyzer/shinken/files/shinken.initd index 310078d..2d42b12 100644 --- a/net-analyzer/shinken/files/shinken.initd +++ b/net-analyzer/shinken/files/shinken.initd @@ -16,23 +16,35 @@ eval CONFIGFILE="\${${_MODULE}CFG}" eval PIDFILE="\${${_MODULE}PID}" SHINKENM="/usr/bin/shinken-${MODULE}" if [ $MODULE = "arbiter" ]; then - CONFIGFILE="${CONFIGFILE} -c ${SHINKENSPECIFICCFG}" + CONFIGFILE="${SHINKENCFG} --config ${SHINKENSPECIFICCFG}" fi +NEED="net" depend() { - need net + if [ $SVCNAME = "shinken" ]; then + NEED="$NEED shinken.arbiter shinken.broker shinken.scheduler" + ebegin "show $NEED" + fi + need $NEED } start() { - ebegin "${SVCNAME} ${MODULE} ${PIDFILE}" + if [ $SVCNAME = "shinken" ]; then + ebegin "all shinken-services started" + return 0 + fi + ebegin "starting shinken ${MODULE}" start-stop-daemon --start --exec ${SHINKENM} --pidfile "${PIDFILE}" \ - -- --config ${CONFIGFILE} --daemon + -- --config ${CONFIGFILE} --daemon + eend $? } stop() { - local X RETVAL=0 - - ebegin "Stopping shinken application ${MODULE}" + if [ $SVCNAME = "shinken" ]; then + ebegin "all shinken-services stopped" + return 0 + fi + ebegin "Stopping shinken ${MODULE}" start-stop-daemon --stop --exec ${SHINKENM} --pidfile ${PIDFILE} eend $? }