commit: 026e7bffcfc4567001c154bc3dd5c41e67717b09 Author: Ultrabug <ultrabug <AT> gentoo <DOT> org> AuthorDate: Tue Apr 14 16:40:10 2015 +0000 Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org> CommitDate: Tue Apr 14 16:40:10 2015 +0000 URL: https://gitweb.gentoo.org/dev/ultrabug.git/commit/?id=026e7bff
new app-admin/aerospike-amc-community app-admin/aerospike-amc-community/Manifest | 3 ++ .../aerospike-amc-community-3.5.4.ebuild | 59 ++++++++++++++++++++++ app-admin/aerospike-amc-community/files/amc.init | 28 ++++++++++ 3 files changed, 90 insertions(+) diff --git a/app-admin/aerospike-amc-community/Manifest b/app-admin/aerospike-amc-community/Manifest new file mode 100644 index 0000000..678de7d --- /dev/null +++ b/app-admin/aerospike-amc-community/Manifest @@ -0,0 +1,3 @@ +AUX amc.init 755 SHA256 57e36710051ac150c8bd880fdc1265dce7041f71bf14337d3d1f89e836f5309d SHA512 d049915eb1818ca831ddf4a73cbc2d10ed46ff9d43bd9bbf33788f75fb0c838229d8034c0904dc4088fa194533fd3b29af990ab2f44ef27aeae935a8b1666440 WHIRLPOOL 0044155f7a039a6615a262e41bef3593278aca8fc444e51ddf98c53a99066fdbe4ecb97b91f53eef6cdc266e9d2829dd997e5f94e3513b6fe5625735a48e95db +DIST aerospike-amc-community-3.5.4.all.x86_64.deb 1414546 SHA256 0e055873632a278b5974b5db12c32a3912f2166ae1f0a7ed58271f9f4c19afc9 SHA512 aa092c43c5242129c7fb1a7f5c2fe09a98540d714f033a58cebcebaae34eab68f3e7b461cd049c2307a499e828c9252348cf832ce95355236e53c1e87628e4b8 WHIRLPOOL 0abd84dfc4fe841ea4c1053217088d499e32f440fc913d3fb4b3f8e00c78d2be590760b719e53989127a8739fb031e23c537a9ea5995732436014677f96dd10c +EBUILD aerospike-amc-community-3.5.4.ebuild 1245 SHA256 a4576fee39ee81e8f1cde04bbf07f19152cffe613ccdef7d8a5d9299cdd50050 SHA512 8c75e687b1762b41e915ba0dd2327050ba0ea1f0d8f4aca76954bd275d8972b83e97950007e9b7ed52a0ab4116624c93a2d0a63fcb94774d7bedcd26feb594fe WHIRLPOOL 4161979548e96f3c22335e083975338588c3aa710475131b265974937d6a24b6d5393a690ed2c92f1c852b0fd55efde7e7e12bac679d02b6f48fded6e30832a6 diff --git a/app-admin/aerospike-amc-community/aerospike-amc-community-3.5.4.ebuild b/app-admin/aerospike-amc-community/aerospike-amc-community-3.5.4.ebuild new file mode 100644 index 0000000..f491106 --- /dev/null +++ b/app-admin/aerospike-amc-community/aerospike-amc-community-3.5.4.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 +inherit eutils user + +DESCRIPTION="Web UI based monitoring tool for Aerospike Community Edition Server" +HOMEPAGE="http://www.aerospike.com" +SRC_URI="http://www.aerospike.com/artifacts/${PN}/${PV}/${P}.all.x86_64.deb" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND="app-crypt/gcr" +DEPEND="${RDEPEND}" + +src_unpack() { + default + mkdir "${P}" + tar -xzf data.tar.gz -C "${S}" || die +} + +src_install() { + tar -xzf opt/amc.tar.gz -C opt/ || die + rm opt/amc.tar.gz + + mv opt/amc/amc/* opt/amc/ + rm -rf opt/amc/amc + rm -f opt/amc/install + rm -f opt/amc/bin/uninstall + rm -f opt/amc/bin/amc_*.sh + + insinto /etc/logrotate.d + newins opt/amc/config/logrotate amc + rm -f opt/amc/config/logrotate + + insinto /etc/cron.daily + newins opt/amc/config/logcron amc + rm -f opt/amc/config/logcron + + sed -e 's@/tmp/amc.pid@/run/amc.pid@g' -i opt/amc/config/gunicorn_config.py + + insinto /etc/amc/config + doins -r opt/amc/config/* + rm -rf opt/amc/config/ + + echo "${PV}" > opt/amc/amc_version + + insinto /opt/amc/ + doins -r opt/amc/* + + keepdir /var/log/amc + fperms +x /opt/amc/bin/gunicorn + + newinitd "${FILESDIR}"/amc.init amc +} diff --git a/app-admin/aerospike-amc-community/files/amc.init b/app-admin/aerospike-amc-community/files/amc.init new file mode 100755 index 0000000..fbcc2ec --- /dev/null +++ b/app-admin/aerospike-amc-community/files/amc.init @@ -0,0 +1,28 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mongodb.initd-r2,v 1.2 2014/05/26 08:03:45 ultrabug Exp $ + +config_file=${config_file:-/etc/amc/config/gunicorn_config.py} +run_dir=${run_dir:-/run} + +command="/opt/amc/bin/gunicorn" +command_args="--daemon --config ${config_file} flaskapp:app" +command_background="true" +pidfile=${run_dir}/${SVCNAME}.pid +user=${user:-root} +group=${group:-root} +start_stop_daemon_args="--user ${user} --group ${group}" +required_files="${config_file}" + +depend() { + use net +} + +start_pre() { + checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}" +} + +start_post() { + ewaitfile 60 "${pidfile}" +}
