Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: peter@abbnm.com (Peter da Silva)
Subject: Re: running a runlevel-3 service as ordinary user at boot-time: what's wrong?
Date: Thu, 2 Oct 2003 17:25:43 +0000 (UTC)	[thread overview]
Message-ID: <blhn2n$2mu8$1@jeeves.eng.abbnm.com> (raw)
In-Reply-To: DcVeb.3580$vO5.111800@twister1.libero.it

In article <DcVeb.3580$vO5.111800@twister1.libero.it>,
devnull <devnull@indirizzo.fasullo.it> wrote:
> what i'm doing is trying to write a script ("rc3script") into /sbin/init.d
> containing something like
> 
> su - user -c '$USERVARIABLECONTAININGAPATH/userscript.sh &'
> 
> when invoked with start as first parameter (yes it should be "forked").

First I'd make sure that it printed something at boot time outside of
this inner script:

echo "Starting userscript.sh as user from $USERVARIABLECONTAININGAPATH" \
	> /dev/console
su - user -c '$USERVARIABLECONTAININGAPATH/userscript.sh &'

That way you can see whether it's actually *trying* to run the script and
what it's running it as.

Also, you should call it like this:

nohup su - user -c 'whatever' < /dev/null > /dev/null 2>&1

Just to isolate it from potential signal problems.

-- 
I've seen things you people can't imagine. Chimneysweeps on fire over the roofs
of London. I've watched kite-strings glitter in the sun at Hyde Park Gate.  All
these things will be lost in time, like chalk-paintings in the rain.   `-_-'
Time for your nap.  | Peter da Silva | Har du kramat din varg, idag?    'U`


      reply	other threads:[~2003-10-02 17:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-02 12:52 running a runlevel-3 service as ordinary user at boot-time: what's wrong? devnull
2003-10-02 17:25 ` Peter da Silva [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox