* [gentoo-user] Init script strangeness.
@ 2005-11-21 14:11 Anthony Roy
2005-11-21 14:50 ` Neil Bothwick
0 siblings, 1 reply; 4+ messages in thread
From: Anthony Roy @ 2005-11-21 14:11 UTC (permalink / raw
To: gentoo-user
Hi all,
I have written a simple init script for controlling a wiki, and have
encountered a strange effect:
from the init.d directory, I can start and stop my app just fine with
wiki start and wiki stop resp. However, the stop script complains that
the script has not been started!
rc-status does not list my script, however wiki status shows it as started!
The script is as follows:
=====================
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
need net
after domainname
}
start() {
ebegin "Starting Wiki"
start-stop-daemon --start --quiet --background --pidfile
/var/run/antwiki.pid --make-pidfile --exec /srv/wiki/wiki-start
eend $?
}
stop() {
ebegin "Stopping Wiki"
start-stop-daemon --stop --pidfile /var/run/antwiki.pid --name wiki
wget http://localhost:1234/?shutdown > /dev/null
eend $?
}
==========================
Any ideas?
--
Ant...
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Init script strangeness.
2005-11-21 14:11 [gentoo-user] Init script strangeness Anthony Roy
@ 2005-11-21 14:50 ` Neil Bothwick
2005-11-21 20:30 ` Anthony Roy
0 siblings, 1 reply; 4+ messages in thread
From: Neil Bothwick @ 2005-11-21 14:50 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 325 bytes --]
On Mon, 21 Nov 2005 14:11:09 +0000, Anthony Roy wrote:
> I have written a simple init script for controlling a wiki, and have
> encountered a strange effect:
You don't appear to have "#!/sbin/runscript" on the first line.
--
Neil Bothwick
... "I just forgot to increment the counter," Tom said, nonplussed.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Init script strangeness.
2005-11-21 14:50 ` Neil Bothwick
@ 2005-11-21 20:30 ` Anthony Roy
2005-11-22 0:24 ` Richard Fish
0 siblings, 1 reply; 4+ messages in thread
From: Anthony Roy @ 2005-11-21 20:30 UTC (permalink / raw
To: gentoo-user
Thanks for the quick reply, but #!/sbin/runscript is the first line -
it must have scrolled just off of the screen when I copied the text
(sorry!).
> You don't appear to have "#!/sbin/runscript" on the first line.
Any other ideas.
--
Ant...
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Init script strangeness.
2005-11-21 20:30 ` Anthony Roy
@ 2005-11-22 0:24 ` Richard Fish
0 siblings, 0 replies; 4+ messages in thread
From: Richard Fish @ 2005-11-22 0:24 UTC (permalink / raw
To: gentoo-user
On 11/21/05, Anthony Roy <antroy@gmail.com> wrote:
> Thanks for the quick reply, but #!/sbin/runscript is the first line -
> it must have scrolled just off of the screen when I copied the text
> (sorry!).
There are 2 conditions required for the start-stop-daemon to
successfully stop the service:
1. A process with the given process id must exist in the system
2. Since you are giving the "--name wiki" option, the process name in
/proc/<pid>/stat must be "wiki".
Can you verify that both of those conditions are true?
# cat /proc/`cat /var/run/antwiki.pid`/stat
-Richard
>
> > You don't appear to have "#!/sbin/runscript" on the first line.
>
> Any other ideas.
>
> --
> Ant...
>
> --
> gentoo-user@gentoo.org mailing list
>
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-11-22 0:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-21 14:11 [gentoo-user] Init script strangeness Anthony Roy
2005-11-21 14:50 ` Neil Bothwick
2005-11-21 20:30 ` Anthony Roy
2005-11-22 0:24 ` Richard Fish
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox