From: | "Hans de Graaff (graaff)" <graaff@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in app-misc/sphinx/files: searchd.rc |
Date: | Thu, 05 Nov 2009 15:42:01 |
Message-Id: | E1N64TF-0001eZ-89@stork.gentoo.org |
1 | graaff 09/11/05 15:41:57 |
2 | |
3 | Added: searchd.rc |
4 | Log: |
5 | Belated commit: add init.d file for managing searchd. |
6 | (Portage version: 2.1.6.13/cvs/Linux x86_64) |
7 | |
8 | Revision Changes Path |
9 | 1.1 app-misc/sphinx/files/searchd.rc |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/sphinx/files/searchd.rc?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/sphinx/files/searchd.rc?rev=1.1&content-type=text/plain |
13 | |
14 | Index: searchd.rc |
15 | =================================================================== |
16 | #!/sbin/runscript |
17 | # Copyright 1999-2004 Gentoo Foundation |
18 | # Distributed under the terms of the GNU General Public License v2 |
19 | # $Header: /var/cvsroot/gentoo-x86/app-misc/sphinx/files/searchd.rc,v 1.1 2009/11/05 15:41:56 graaff Exp $ |
20 | |
21 | depend() { |
22 | need net |
23 | use logger |
24 | } |
25 | |
26 | checkconfig() { |
27 | if [ ! -f /etc/sphinx/sphinx.conf ] ; then |
28 | eerror "Please create /etc/sphinx/sphinx.conf" |
29 | eerror "Sample conf: /etc/sphinx/sphinx.conf.dist" |
30 | return 1 |
31 | fi |
32 | return 0 |
33 | } |
34 | |
35 | start() { |
36 | checkconfig || return $? |
37 | |
38 | ebegin "Starting sphinx searchd" |
39 | start-stop-daemon --start --exec /usr/bin/searchd |
40 | eend $? "Failed to start sphinx searchd" |
41 | } |
42 | |
43 | stop() { |
44 | ebegin "Stopping sphinx searchd" |
45 | start-stop-daemon --stop --exec /usr/bin/searchd |
46 | eend $? "Failed to stop sphinx searchd" |
47 | } |