#!/sbin/runscript # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later opts="depend checkconfig start stop" my_conf="/etc/rabl_server/rabl_server.conf" me="rabl_server" depend() { need net } checkconfig() { if [ ! -e $my_conf ] ; then eerror "You need to create ${my_conf} first." return 1 fi } start() { ebegin "Starting ${me}" # BUG: # it doesn't daemonize # no PID file checkconfig && \ start-stop-daemon --start --quiet \ --pidfile /var/run/${me} \ --make-pidfile \ --background \ --exec /usr/bin/rabl_server -- ${OPTIONS} eend $? } stop() { ebegin "Stopping ${me}" start-stop-daemon --stop --quiet \ --pidfile /var/run/${me} \ --exec /usr/bin/rabl_server eend $? }