Gentoo Archives: gentoo-user

From: Anthony Roy <antroy@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Init script strangeness.
Date: Mon, 21 Nov 2005 14:18:59
Message-Id: 12bada460511210611p5ba26012v@mail.gmail.com
1 Hi all,
2
3 I have written a simple init script for controlling a wiki, and have
4 encountered a strange effect:
5
6 from the init.d directory, I can start and stop my app just fine with
7 wiki start and wiki stop resp. However, the stop script complains that
8 the script has not been started!
9
10 rc-status does not list my script, however wiki status shows it as started!
11
12 The script is as follows:
13 =====================
14 # Copyright 1999-2005 Gentoo Foundation
15 # Distributed under the terms of the GNU General Public License v2
16 # $Header: $
17
18 depend() {
19 need net
20 after domainname
21 }
22
23 start() {
24 ebegin "Starting Wiki"
25 start-stop-daemon --start --quiet --background --pidfile
26 /var/run/antwiki.pid --make-pidfile --exec /srv/wiki/wiki-start
27 eend $?
28 }
29
30 stop() {
31 ebegin "Stopping Wiki"
32 start-stop-daemon --stop --pidfile /var/run/antwiki.pid --name wiki
33 wget http://localhost:1234/?shutdown > /dev/null
34 eend $?
35 }
36 ==========================
37
38 Any ideas?
39
40 --
41 Ant...
42
43 --
44 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Init script strangeness. Neil Bothwick <neil@××××××××××.uk>