#!/sbin/runscript # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ depend() { need net } checkconfig() { if [ ! -r /etc/conf.d/quantum-server ]; then eerror "No Quantum Config found: /etc/conf.d/quantum-server)" return 1 fi # FIXME: might be nice to add some checks for proper /etc/quantum config files return 0 } start() { checkconfig || return $? ebegin "Starting ${SVCNAME}" start-stop-daemon --start --background --make-pidfile \ --pidfile "${PID_PATH}/${SVCNAME}.pid" \ --exec /usr/bin/${SVCNAME} -- \ --log-file=${LOG_PATH}/${SVCNAME}.log eend $? "Failed to start ${SVCNAME}" } stop() { checkconfig || return $? ebegin "Stopping ${SVCNAME}" start-stop-daemon --stop --pidfile "${PID_PATH}/${SVCNAME}.pid" \ --exec /usr/bin/${SVCNAME} eend $? "Failed to stop ${SVCNAME}" } #restart() { # #}