From a6dee94883caf8176b4b087506802456203cac0d Mon Sep 17 00:00:00 2001 From: Kacper Kowalik Date: Sat, 19 Jun 2010 20:12:41 +0000 Subject: Adding init script. Thanks to Ultrabug (Portage version: 2.1.8.3/cvs/Linux x86_64) --- sys-cluster/csync2/ChangeLog | 6 +++++- sys-cluster/csync2/csync2-1.34-r1.ebuild | 4 +++- sys-cluster/csync2/files/csync2.initd | 26 ++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100755 sys-cluster/csync2/files/csync2.initd (limited to 'sys-cluster') diff --git a/sys-cluster/csync2/ChangeLog b/sys-cluster/csync2/ChangeLog index ae46cc6f5f72..97e17be4e23a 100644 --- a/sys-cluster/csync2/ChangeLog +++ b/sys-cluster/csync2/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-cluster/csync2 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/csync2/ChangeLog,v 1.28 2010/06/17 20:08:04 xarthisius Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/csync2/ChangeLog,v 1.29 2010/06/19 20:12:41 xarthisius Exp $ + + 19 Jun 2010; Kacper Kowalik +files/csync2.initd, + csync2-1.34-r1.ebuild: + Adding init script. Thanks to Ultrabug *csync2-1.34-r1 (17 Jun 2010) diff --git a/sys-cluster/csync2/csync2-1.34-r1.ebuild b/sys-cluster/csync2/csync2-1.34-r1.ebuild index 838137324215..a5b7d4fcc75a 100644 --- a/sys-cluster/csync2/csync2-1.34-r1.ebuild +++ b/sys-cluster/csync2/csync2-1.34-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/csync2/csync2-1.34-r1.ebuild,v 1.1 2010/06/17 20:08:04 xarthisius Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/csync2/csync2-1.34-r1.ebuild,v 1.2 2010/06/19 20:12:41 xarthisius Exp $ EAPI=2 @@ -47,6 +47,8 @@ src_install() { dodir /var/lib/csync2/ || die keepdir /var/lib/csync2/ + newinitd "${FILESDIR}"/${PN}.initd ${PN} || die + dodoc AUTHORS ChangeLog INSTALL NEWS README TODO csync2_locheck.sh || die } diff --git a/sys-cluster/csync2/files/csync2.initd b/sys-cluster/csync2/files/csync2.initd new file mode 100755 index 000000000000..55537be94a66 --- /dev/null +++ b/sys-cluster/csync2/files/csync2.initd @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/csync2/files/csync2.initd,v 1.1 2010/06/19 20:12:41 xarthisius Exp $ + +PIDFILE=/var/run/csync2.pid +BINARY=/usr/sbin/csync2 + +start() { + ebegin "Starting csync2" + start-stop-daemon --start --pidfile "${PIDFILE}" -m -x ${BINARY} -b -- -ii + eend $? +} + +stop() { + ebegin "Stopping csync2" + start-stop-daemon --stop --pidfile "${PIDFILE}" + eend $? +} + +restart() { + ebegin "Restarting csync2" + svc_stop + svc_start + eend $? +} -- cgit v1.2.3-65-gdbad