Re: Can't Detach from a startup script



Martin wrote:
On Sat, Aug 30, 2008 at 5:56 AM, Kent West <westk@xxxxxxx> wrote:
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon -c $USER --start --quiet --pidfile $PIDFILE --exec
$DAEMON -- $OPT \
> /dev/null

hmm looks to my that either you missed the --background option for
start-stop-daemon or you missed the option for $DAEMON to send it to
background...

I see from the start-stop-daemon man page that I might can throw in a "-b" to force a detachment, but is that the correct way to fix my problem? The man page suggests that this should be a last resort.

So you're suggesting that I DO use the -b (or --background) option, that this is the correct fix for my problem?

I did add that in, and now I can exit out of my ssh session after starting the daemon, but as I say, since the man page says that's a last resort, I wasn't sure I should do that. (And I haven't tried to see if a "restart" or "stop" works properly from my script with that added in.)

Thanks!


--
Kent West <")))><
Westing Peacefully - http://kentwest.blogspot.com


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: RH 9.0 and sendmail...
    ... do I need to have sendmail running to just ... > $ mail -v root ... > If I don't have to run it as a daemon, ... > unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe ...
    (RedHat)
  • Re: Kernel error: DMA write timed out
    ... message has repeated while 10 seconds in syslog. ... So the lpr package is not installed on your system? ... The "catch" is that the daemon is called lpd while the init ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Bash script forking
    ... I have a BASH script which run as daemon, and now I want to fork a ... Debian GNU/Linux Consultant ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Sendmail to send mail only, using MX records
    ... I have sendmail installed on etch, but not running as a daemon. ... the logs show this: ... to understand and assimilate technology. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: FreeBSDs Visual Identity: Outdated?
    ... It's a daemon. ... Karol Kwiatkowski <freebsd at orchid dot homeunix dot org> ... To unsubscribe, ...
    (freebsd-arch)