--- cupsd 2003-09-17 13:19:25.000000000 +1000 +++ cupsd-new 2003-09-17 13:09:45.000000000 +1000 @@ -1,7 +1,9 @@ #!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /home/cvsroot/gentoo-x86/net-print/cups/files/cupsd.rc6,v 1.12 2003/07/28 12:57:08 lanius Exp $ +# $Header: /home/cvsroot/gentoo-x86/net-print/cups/files/cupsd.rc6,v 1.9 2003/07/18 12:19:04 lanius Exp $ + +DAEMONTOOLSDIR="/var/daemontools/cupsd" depend() { before nfs @@ -9,13 +11,32 @@ } start() { - ebegin "Starting cupsd" - start-stop-daemon --start --quiet --exec /usr/sbin/cupsd + if [ -x /usr/bin/svc ] && [ -x "${DAEMONTOOLSDIR}/run" ] \ + && [ ! -f "${DAEMONTOOLSDIR}/noinit" ] + then + ebegin "Starting supervised cupsd" + /usr/bin/supervise "$DAEMONTOOLSDIR" & + else + ebegin "Starting cupsd" + start-stop-daemon --start --quiet --exec /usr/sbin/cupsd + fi eend $? } stop() { ebegin "Stopping cupsd" - start-stop-daemon --stop --quiet --exec /usr/sbin/cupsd + if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR" + then + /usr/bin/svc -dx "$DAEMONTOOLSDIR" + else + start-stop-daemon --stop --quiet --exec /usr/sbin/cupsd + fi eend $? } + +status() { + if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR" + then + einfo `/usr/bin/svstat "$DAEMONTOOLSDIR"` + fi +}