#!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: depend() { need net } start() { unset ARGS [[ -n "${XSIZE}" ]] && ARGS+="-x ${XSIZE} " [[ -n "${YSIZE}" ]] && ARGS+="-y ${YSIZE} " [[ -n "${PORT}" ]] && ARGS+="-p ${PORT} " [[ -n "${MAXCLIENTS}" ]] && ARGS+="-m ${MAXCLIENTS} " [[ -n "${DELAY}" ]] && ARGS+="-d ${DELAY} " [[ -n "${BGCOLOR}" ]] && ARGS+="-c ${BGCOLOR} " [[ -n "${EMAIL}" ]] && ARGS+="-e ${EMAIL} " [[ -n "${FROM}" ]] && ARGS+="-from ${FROM} " [[ -n "${SMTP}" ]] && ARGS+="-smtp ${SMTP} " [[ -n "${LANG}" ]] && ARGS+="-lang ${LANG} " [[ -n "${BGIMAGE}" ]] && ARGS+="-b ${BGIMAGE} " [[ -n "${IMAGEDIR}" ]] && ARGS+="-savepath ${IMAGEDIR} " [[ -z "${IMAGEDIR}" ]] && ARGS+="-s off " ebegin "Starting drawboard" cd /usr/share/drawboard start-stop-daemon --start --quiet -p /var/run/drawboard.pid -m -b --startas $(java-config -J) -- -cp drawboard.jar drawboard.Server ${ARGS} eend $? } stop() { ebegin "Stopping drawboard" start-stop-daemon --stop --quiet --pidfile /var/run/drawboard.pid eend $? }