Date: Sun, 04 Dec 2005 15:14:34 +0100 From: Werther Pirani <werther.pirani@nexgo.de> To: freebsd-questions@freebsd.org Subject: Re: schedule a script at "system startup" Message-ID: <4392F9CA.2050808@nexgo.de> In-Reply-To: <7.0.0.16.2.20051203201101.061b5dd8@msdi.ca> References: <7.0.0.16.2.20051203201101.061b5dd8@msdi.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
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) 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 -- I went mad for a while -- did me no end of good.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4392F9CA.2050808>