#!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba-svc,v 1.3 2004/07/14 23:37:16 agriffis Exp $ SVCDIR=/var/lib/supervise depend() { need net } start() { ebegin "Starting SAMBA" if [ ! -e ${SVCDIR}/control/smbd ] ; then ln -sf ../services/smbd ${SVCDIR}/control/smbd fi if [ ! -e ${SVCDIR}/control/nmbd ] ; then ln -sf ../services/nmbd ${SVCDIR}/control/nmbd fi /usr/bin/svc -u ${SVCDIR}/control/smbd /usr/bin/svc -u ${SVCDIR}/control/nmbd eend $? } stop() { ebegin "Stopping $SERVICE" if [ -e ${SVCDIR}/control/smbd ] ; then /usr/bin/svc -dx ${SVCDIR}/control/smbd/log /usr/bin/svc -dx ${SVCDIR}/control/smbd # rm ${SVCDIR}/control/smbd fi if [ -e ${SVCDIR}/control/nmbd ] ; then /usr/bin/svc -dx ${SVCDIR}/control/nmbd/log /usr/bin/svc -dx ${SVCDIR}/control/nmbd # rm ${SVCDIR}/control/nmbd fi eend $? }