From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,62b777b00162ff4d X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-10-02 10:41:38 PST Path: archiver1.google.com!news2.google.com!newsfeed.stanford.edu!news-proxy.abbnm.com!newsboy.eng.abbnm.com!not-for-mail From: peter@abbnm.com (Peter da Silva) Newsgroups: comp.unix.tru64 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) Organization: ABB Network Management Division Message-ID: References: NNTP-Posting-Host: grendel.eng.abbnm.com X-Trace: jeeves.eng.abbnm.com 1065115543 89032 198.178.0.150 (2 Oct 2003 17:25:43 GMT) X-Complaints-To: usenet@jeeves.eng.abbnm.com NNTP-Posting-Date: Thu, 2 Oct 2003 17:25:43 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: peter@abbnm.com (Peter da Silva) Xref: archiver1.google.com comp.unix.tru64:8 In article , devnull 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`