From owner-freebsd-questions@FreeBSD.ORG Sun Dec 4 14:14:45 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D65516A420 for ; Sun, 4 Dec 2005 14:14:45 +0000 (GMT) (envelope-from werther.pirani@nexgo.de) Received: from mail-in-09.arcor-online.net (mail-in-09.arcor-online.net [151.189.21.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BB2843D6D for ; Sun, 4 Dec 2005 14:14:44 +0000 (GMT) (envelope-from werther.pirani@nexgo.de) Received: from mail-in-06-z2.arcor-online.net (mail-in-06-z2.arcor-online.net [151.189.8.18]) by mail-in-09.arcor-online.net (Postfix) with ESMTP id AB425CA2D3 for ; Sun, 4 Dec 2005 15:14:41 +0100 (CET) Received: from mail-in-09.arcor-online.net (mail-in-09.arcor-online.net [151.189.21.49]) by mail-in-06-z2.arcor-online.net (Postfix) with ESMTP id 9F79D162BF8 for ; Sun, 4 Dec 2005 15:14:41 +0100 (CET) Received: from [192.168.0.1] (p5496D596.dip.t-dialin.net [84.150.213.150]) (Authenticated sender: werther.pirani@arcor.de) by mail-in-09.arcor-online.net (Postfix) with ESMTP id 2674CCA356 for ; Sun, 4 Dec 2005 15:14:41 +0100 (CET) Message-ID: <4392F9CA.2050808@nexgo.de> Date: Sun, 04 Dec 2005 15:14:34 +0100 From: Werther Pirani User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <7.0.0.16.2.20051203201101.061b5dd8@msdi.ca> In-Reply-To: <7.0.0.16.2.20051203201101.061b5dd8@msdi.ca> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: schedule a script at "system startup" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Dec 2005 14:14:45 -0000 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.