summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <dragonheart@gentoo.org>2005-01-24 14:05:34 +0000
committerDaniel Black <dragonheart@gentoo.org>2005-01-24 14:05:34 +0000
commited4330d61b3ade91fd63001e9eb1e86f8e1bae37 (patch)
treec38bda97be8605a7eb9e55030fe8daab690c1e87 /net-ftp/frox/files/frox.rc
parentnet-ftp/frox:clamav (diff)
downloadgentoo-2-ed4330d61b3ade91fd63001e9eb1e86f8e1bae37.tar.gz
gentoo-2-ed4330d61b3ade91fd63001e9eb1e86f8e1bae37.tar.bz2
gentoo-2-ed4330d61b3ade91fd63001e9eb1e86f8e1bae37.zip
Initial import as per bug #50674
(Portage version: 2.0.51-r14)
Diffstat (limited to 'net-ftp/frox/files/frox.rc')
-rw-r--r--net-ftp/frox/files/frox.rc46
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 $?
+}
+