diff options
Diffstat (limited to 'net-ftp/frox/files/frox.rc')
-rw-r--r-- | net-ftp/frox/files/frox.rc | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/net-ftp/frox/files/frox.rc b/net-ftp/frox/files/frox.rc new file mode 100644 index 000000000000..949d0e58a251 --- /dev/null +++ b/net-ftp/frox/files/frox.rc @@ -0,0 +1,46 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-ftp/frox/files/frox.rc,v 1.1 2005/01/24 14:05:34 dragonheart Exp $ + +PROGNAME=`basename $1` + +opts="depend start stop reload" + +depend() { + need net +} + +checkconfig() { + if [ -f /etc/frox.config ] ; then + eerror "missing /etc/frox.config" + return 1 + fi + +} + +start() { + checkconfig || return 1 + FROX_OPTS=" -f /etc/frox.conf" + + ebegin "Starting ${PROGNAME}..." + start-stop-daemon --start --quiet --exec /usr/sbin/${PROGNAME} -- ${OPTIONS} ${FROX_OPTS} &> /dev/null + eend $? +} + +stop() { + ebegin "Stop ${PROGNAME}..." + start-stop-daemon --stop --quiet --exec /usr/sbin/${PROGNAME} &> /dev/null + eend $? +} + +reload() { + if [ ! -f /var/run/frox/frox.pid ]; then + eerror "frox isn't running" + return 1 + fi + ebegin "Reloading configuration" + kill -HUP `cat /var/run/frox/frox.pid` &>/dev/null + eend $? +} + |