aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sphinx/sphinx.initd
diff options
context:
space:
mode:
authorFrancesco Colista <francesco.colista@gmail.com>2012-10-24 07:34:28 +0000
committerFrancesco Colista <francesco.colista@gmail.com>2012-10-24 07:34:28 +0000
commit188a3a44b3edaf42f912f5a59a1294c223f08abb (patch)
treec27cb2f7616cfa5ff5e261a46f77665d782373b8 /testing/sphinx/sphinx.initd
parent942295bda2f76216ab3d479a29b1b8996293b649 (diff)
downloadaports-188a3a44b3edaf42f912f5a59a1294c223f08abb.tar.bz2
aports-188a3a44b3edaf42f912f5a59a1294c223f08abb.tar.xz
testing/sphinx: new aport. Fixes #1448
Diffstat (limited to 'testing/sphinx/sphinx.initd')
-rw-r--r--testing/sphinx/sphinx.initd33
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/sphinx/sphinx.initd b/testing/sphinx/sphinx.initd
new file mode 100644
index 0000000000..c6799653fd
--- /dev/null
+++ b/testing/sphinx/sphinx.initd
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/sphinx/files/searchd.rc,v 1.1 2009/11/05 15:41:56 graaff Exp $
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f /etc/sphinx/sphinx.conf ] ; then
+ eerror "Please create /etc/sphinx/sphinx.conf"
+ eerror "Sample conf: /etc/sphinx/sphinx.conf.dist"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Starting sphinx searchd"
+ start-stop-daemon --start --exec /usr/bin/searchd
+ eend $? "Failed to start sphinx searchd"
+}
+
+stop() {
+ ebegin "Stopping sphinx searchd"
+ start-stop-daemon --stop --exec /usr/bin/searchd
+ eend $? "Failed to stop sphinx searchd"
+}
+