schedule a script at "system startup"

Drew Tomlinson drew at mykitchentable.net
Wed Dec 7 09:27:05 PST 2005


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



More information about the freebsd-questions mailing list