diff options
author | Daniel Robbins <drobbins@gentoo.org> | 2001-01-10 07:05:13 +0000 |
---|---|---|
committer | Daniel Robbins <drobbins@gentoo.org> | 2001-01-10 07:05:13 +0000 |
commit | 1ead8bede3e76a6597f49cd526ec07341cbbf780 (patch) | |
tree | ff84b1534379aef71762cf0ff88018169088a069 /sys-apps/dcron | |
parent | supervise and initscript update (diff) | |
download | historical-1ead8bede3e76a6597f49cd526ec07341cbbf780.tar.gz historical-1ead8bede3e76a6597f49cd526ec07341cbbf780.tar.bz2 historical-1ead8bede3e76a6597f49cd526ec07341cbbf780.zip |
supervise and initscript update
Diffstat (limited to 'sys-apps/dcron')
-rw-r--r-- | sys-apps/dcron/dcron-2.7-r1.ebuild (renamed from sys-apps/dcron/dcron-2.7.ebuild) | 12 | ||||
-rwxr-xr-x | sys-apps/dcron/files/dcron | 27 | ||||
-rwxr-xr-x | sys-apps/dcron/files/svc-dcron | 28 |
3 files changed, 39 insertions, 28 deletions
diff --git a/sys-apps/dcron/dcron-2.7.ebuild b/sys-apps/dcron/dcron-2.7-r1.ebuild index 45f51bcbe74e..247e839e5c82 100644 --- a/sys-apps/dcron/dcron-2.7.ebuild +++ b/sys-apps/dcron/dcron-2.7-r1.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author Daniel Robbins <drobbins@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/sys-apps/dcron/dcron-2.7.ebuild,v 1.6 2000/12/25 16:17:42 achim Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/dcron/dcron-2.7-r1.ebuild,v 1.1 2001/01/10 07:05:03 drobbins Exp $ A=dcron27.tgz S=${WORKDIR}/dcron @@ -30,18 +30,16 @@ src_install() { dodoc CHANGELOG README #set up supervise support - dodir /var/supervise/dcron /etc/supervise - exeinto /var/supervise/dcron + exeinto /var/lib/supervise/services/dcron newexe ${FILESDIR}/dcron-run run #this next line tells svcan to start the log process too (and set up a pipe) - chmod +t ${D}/var/supervise/dcron - exeinto /var/supervise/dcron/log + chmod +t ${D}/var/lib/supervise/services/dcron + exeinto /var/lib/supervise/services/dcron/log newexe ${FILESDIR}/log-run run - dosym /var/supervise/dcron /etc/supervise/dcron #install rc script exeinto /etc/rc.d/init.d - doexe ${FILESDIR}/dcron + doexe ${FILESDIR}/dcron ${FILESDIR}/svc-dcron insinto /etc doins ${FILESDIR}/crontab diff --git a/sys-apps/dcron/files/dcron b/sys-apps/dcron/files/dcron index c4d1efd59dba..a8da6b9eddd7 100755 --- a/sys-apps/dcron/files/dcron +++ b/sys-apps/dcron/files/dcron @@ -6,33 +6,18 @@ SERVICE=dcron EXE="/usr/sbin/crond" -SVCDIR=/etc/supervise/dcron opts="start stop" start() { - ebegin "Starting ${SERVICE}" - start-stop-daemon --start --quiet --exec $EXE 1>&2 - eend $? "Error starting ${SERVICE}." + ebegin "Starting ${SERVICE}" + start-stop-daemon --start --quiet --exec $EXE 1>&2 + eend $? } stop() { - ebegin "Stopping ${SERVICE}" - start-stop-daemon --stop --quiet -u root -n $SERVICE 1>&2 - eend $? "Error stopping ${SERVICE}." -} - -supervise_start() { - ebegin "Starting supervised ${SERVICE}" - /usr/bin/svc -u ${SVCDIR} - /usr/bin/svc -u ${SVCDIR}/log - eend $? "Error starting ${SERVICE} supervised." -} - -supervise_stop() { - ebegin "Stopping supervised ${SERVICE}" - /usr/bin/svc -d ${SVCDIR} - /usr/bin/svc -d ${SVCDIR}/log - eend $? "Error stopping ${SERVICE} supervised" + ebegin "Stopping ${SERVICE}" + start-stop-daemon --stop --quiet -u root -n $SERVICE 1>&2 + eend $? } doservice ${@} diff --git a/sys-apps/dcron/files/svc-dcron b/sys-apps/dcron/files/svc-dcron new file mode 100755 index 000000000000..e40af21c4f8f --- /dev/null +++ b/sys-apps/dcron/files/svc-dcron @@ -0,0 +1,28 @@ +#!/bin/sh +#RCUPDATE:2 3 4:80:This line is required for script management + +. /etc/rc.d/config/basic +. /etc/rc.d/config/functions + +SERVICE=svc-dcron +opts="start stop" + +start() { + ebegin "Starting ${SERVICE}" + ln -sf ../services/${SERVICE} ${SVCDIR}/control/${SERVICE} + eend $? +} + +stop() { + ebegin "Stopping ${SERVICE}" + if [ -e ${SVCDIR}/control/${SERVICE} ] + then + /usr/bin/svc -dx ${SVCDIR}/control/${SERVICE}/log + /usr/bin/svc -dx ${SVCDIR}/control/${SERVICE} + rm ${SVCDIR}/control/${SERVICE} + fi + eend $? +} + +doservice ${@} + |