summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-ftp/frox/files/frox.initd')
-rw-r--r--net-ftp/frox/files/frox.initd38
1 files changed, 38 insertions, 0 deletions
diff --git a/net-ftp/frox/files/frox.initd b/net-ftp/frox/files/frox.initd
new file mode 100644
index 000000000000..8ed9f332e87a
--- /dev/null
+++ b/net-ftp/frox/files/frox.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/frox/files/frox.initd,v 1.1 2013/06/17 14:36:38 pinkbyte Exp $
+
+extra_commands="reload"
+
+FROX_CONFIG="/etc/frox.conf"
+FROX_PID_FILE="/var/run/frox/frox.pid"
+FROX_OPTS="-f ${FROX_CONFIG}"
+
+checkconfig() {
+ local piddir="$(dirname ${FROX_PID_FILE})"
+ checkpath -q -d -o ftpproxy:ftpproxy -m 0770 "${piddir}" || return 1
+ if [ ! -f "${FROX_CONFIG}" ] ; then
+ eerror "missing ${FROX_CONFIG}"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --exec /usr/sbin/frox -- ${FROX_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/frox --pidfile "${FROX_PID_FILE}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading configuration"
+ start-stop-daemon --signal HUP --pidfile "${FROX_PID_FILE}"
+ eend $?
+}