Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Dec 2005 09:26:44 -0800
From:      Drew Tomlinson <drew@mykitchentable.net>
To:        Werther Pirani <werther.pirani@nexgo.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: schedule a script at "system startup"
Message-ID:  <43971B54.9070907@mykitchentable.net>
In-Reply-To: <4392F9CA.2050808@nexgo.de>
References:  <7.0.0.16.2.20051203201101.061b5dd8@msdi.ca> <4392F9CA.2050808@nexgo.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/4/2005 6:14 AM Werther Pirani wrote:

> Ian Lord wrote:
>
>> I guess there might be a way to put a script in /etc/rd.d/ but I
>> don't know how to run it under a specifid uid
>
>
> Create a script (name is not important as long as it ends in .sh)


Although customary, it does not have to end in ".sh" AFIK

Cheers,

Drew.

> and put it in /usr/local/etc/rc.d. Also, make sure the script is
> executable and contains lines like:
>
> #!/bin/sh
>
> echo -n " some informative message here"
>
> su -l username -c '( command arg1 ... argn )'
>
> Run the script (as root) manually with /usr/local/etc/rc.d/sctript.sh to
> verify everything is okay and in case you need/want to add redirection
> (still inside parenthesis).
>
>
>
> Hope this helps,
>
> Werther



-- 
Visit The Alchemist's Warehouse
Magic Tricks, DVDs, Videos, Books, & More!

http://www.alchemistswarehouse.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43971B54.9070907>