#!/sbin/runscript # Copyright 2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: $ depend() { need clock } checkconfig() { if [ ! -e /etc/conserver/conserver.cf ] ; then eerror "You need to create /etc/conserver/conserver.cf first." eerror "A sample is placed there to be renamed and ajusted." eerror "Read the man page or see /usr/share/doc/conserver-/." return 1 fi if [ ! -e /etc/conserver/conserver.passwd ] ; then eerror "You need to create /etc/conserver/conserver.passwd first." eerror "A sample is placed there to be renamed and ajusted." eerror "Read the man page or see /usr/share/doc/conserver-/." return 1 fi } start() { checkconfig || return 1 ebegin "Starting conserver" start-stop-daemon --start --quiet --exec \ /usr/sbin/conserver -- ${CONSERVER_OPTS} eend $? "Failed to start conserver" } stop() { ebegin "Stopping conserver" start-stop-daemon --stop --quiet --pidfile /var/run/conserver.pid eend $? "Failed to stop conserver" }