From 9e73ac3025705aaa6a10220cb0c2511b8a309d31 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Mon, 21 Oct 2013 21:29:17 +0200 Subject: app-admin/lsyncd: Add init scripts to lsyncd, bug #368497 Package-Manager: portage-2.2.7 --- app-admin/lsyncd/ChangeLog | 5 ++++ app-admin/lsyncd/Manifest | 6 +++++ app-admin/lsyncd/files/lsyncd.confd | 12 +++++++++ app-admin/lsyncd/files/lsyncd.initd | 51 ++++++++++++++++++++++++++++++++++++ app-admin/lsyncd/lsyncd-2.1.5.ebuild | 23 ++++++++++++++++ app-admin/lsyncd/metadata.xml | 11 ++++++++ 6 files changed, 108 insertions(+) create mode 100644 app-admin/lsyncd/ChangeLog create mode 100644 app-admin/lsyncd/Manifest create mode 100644 app-admin/lsyncd/files/lsyncd.confd create mode 100755 app-admin/lsyncd/files/lsyncd.initd create mode 100644 app-admin/lsyncd/lsyncd-2.1.5.ebuild create mode 100644 app-admin/lsyncd/metadata.xml (limited to 'app-admin') diff --git a/app-admin/lsyncd/ChangeLog b/app-admin/lsyncd/ChangeLog new file mode 100644 index 00000000..ee37ee52 --- /dev/null +++ b/app-admin/lsyncd/ChangeLog @@ -0,0 +1,5 @@ +*lsyncd-2.1.5 (21 Oct 2013) + + 21 Oct 2013; Bertrand Jacquin +files/lsyncd.confd, + +files/lsyncd.initd, +lsyncd-2.1.5.ebuild, +metadata.xml: + app-admin/lsyncd: Add init scripts to lsyncd, bug #368497 diff --git a/app-admin/lsyncd/Manifest b/app-admin/lsyncd/Manifest new file mode 100644 index 00000000..ec7c45ea --- /dev/null +++ b/app-admin/lsyncd/Manifest @@ -0,0 +1,6 @@ +AUX lsyncd.confd 264 SHA256 5947ddf8e25c120bf01a8a5de853893e8a60513625bd985915a7f21a42eae9d1 WHIRLPOOL 442a7c34e02e1549f42d8b2d81cefbb56cb72b7f10a4f16cd8fa680da9116d8927a581a24ea4291cc9f88c220ce1d8755936dd13f639822847333e494d9be27d +AUX lsyncd.initd 923 SHA256 294041232333cca16bc799646da8a455dcfde48e7796627f6707992cb1b21ef2 WHIRLPOOL 2095ef35e6e3f3d5c3d9d072dc8e5a4369c446fedb017ba3f8e65c7a7dd3086ddc46d5274ee1b131992b1c7c9e79b4eb0f399b42f29e079625a88e272d173bb5 +DIST lsyncd-2.1.5.tar.gz 149873 SHA256 4a793056c4ed833edb59436d7711bb65f7e38a4d8d44371cc9dc5eb91fbc461f WHIRLPOOL 3b5405759542b9a97253fcbc3c66d8005c44045e76527ae645cbaa04cf570f4a5f44a863632b5fc17cba215253743cf0fac8a39cbca488d3b5bfc58a82948ee8 +EBUILD lsyncd-2.1.5.ebuild 645 SHA256 95dc616c7e7c70361d8a2594ac182900e05da150123192aa0b7029a1ff0303c3 WHIRLPOOL affb31a6d9aaa012e2526a467c39481d6c95fbe27f1ebadb57ca9744937c3a375a75ce05edd84ee8799c09f66409fd0e7cc7f7d192cddc99817dca5101489948 +MISC ChangeLog 223 SHA256 97c6342d6b7622d920c26a44916b8a4bdbb9daeab8a45a7e181515fcee62b7c3 WHIRLPOOL 3f890b32adab685163efb965b6da8bc801d1a15a3908791c9df7690279444e7f2dbf3a76ee5098981354db6c7149b74db02c44a768a6f68eb221606af653ff1d +MISC metadata.xml 308 SHA256 c3f79dbe679c2d54c0aaa80d0ec10255f371876067e4ccc89d507d5c6ca18510 WHIRLPOOL 51be27108e176c39a113fc5479a044f6d37080def5d918ebe6d5d8461dab524d03d79a3936fe5de50da285c17069bd7c21e1afc050d8de533efb2d3fe091ee97 diff --git a/app-admin/lsyncd/files/lsyncd.confd b/app-admin/lsyncd/files/lsyncd.confd new file mode 100644 index 00000000..8eae3b9e --- /dev/null +++ b/app-admin/lsyncd/files/lsyncd.confd @@ -0,0 +1,12 @@ +# /etc/conf.d/lsyncd: config file for /etc/init.d/lsyncd + +# Config file +# Take inspiration from /usr/share/lsyncd*/ +LSYNCD_CONFIG_FILE="/etc/lsynd.conf" + +# User to run as +# LSYNCD_USER="" + +# Misc options to pass to lsyncd +# See lsyncd(1) man page +# LSYNCD_OPTS="" diff --git a/app-admin/lsyncd/files/lsyncd.initd b/app-admin/lsyncd/files/lsyncd.initd new file mode 100755 index 00000000..50c07b31 --- /dev/null +++ b/app-admin/lsyncd/files/lsyncd.initd @@ -0,0 +1,51 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +: ${pidfile:=/run/${RC_SVCNAME}.pid} + +: ${LSYNCD_CONFIG_FILE:=/etc/lsyncd.conf} +: ${LSYNCD_USER:=nobody} + +depend() { + after bootmisc + use logger +} + +checkconfig() { + if [[ ! -f "${LSYNCD_CONFIG_FILE}" ]] ; then + eerror "File ${LSYNCD_CONFIG_FILE} is missing" + eerror "See sample in /usr/share/lsyncd*/" + return 1 + fi + + checkpath -f \ + -o "${LSYNCD_USER}" \ + "${pidfile}" \ + || return 1 + + return 0 +} + +start() { + checkconfig || return $? + + ebegin "Starting ${RC_SVCNAME}" + start-stop-daemon --start \ + --user "${LSYNCD_USER}" \ + --exec /usr/bin/lsyncd \ + --pidfile "${pidfile}" \ + -- \ + -pidfile "${pidfile}" \ + ${LSYNCD_OPTS} \ + "${LSYNCD_CONFIG_FILE}" + eend $? +} + +stop() { + ebegin "Stopping ${RC_SVCNAME}" + start-stop-daemon --stop \ + --pidfile "${pidfile}" + eend $? +} diff --git a/app-admin/lsyncd/lsyncd-2.1.5.ebuild b/app-admin/lsyncd/lsyncd-2.1.5.ebuild new file mode 100644 index 00000000..12aca62c --- /dev/null +++ b/app-admin/lsyncd/lsyncd-2.1.5.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/lsyncd/lsyncd-2.1.5.ebuild,v 1.1 2013/06/10 05:28:55 radhermit Exp $ + +EAPI=5 + +DESCRIPTION="Live Syncing (Mirror) Daemon" +HOMEPAGE="http://code.google.com/p/lsyncd/" +SRC_URI="http://lsyncd.googlecode.com/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~arm-linux ~x86-linux" + +CDEPEND=">=dev-lang/lua-5.1[deprecated]" +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND} + net-misc/rsync" + +src_configure() { + econf --docdir="${EPREFIX}"/usr/share/doc/${P} +} diff --git a/app-admin/lsyncd/metadata.xml b/app-admin/lsyncd/metadata.xml new file mode 100644 index 00000000..b3c68b21 --- /dev/null +++ b/app-admin/lsyncd/metadata.xml @@ -0,0 +1,11 @@ + + + + + radhermit@gentoo.org + Tim Harder + + + lsyncd + + -- cgit v1.2.3