From owner-freebsd-questions@FreeBSD.ORG Wed Dec 7 17:27:05 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 9E34D16A41F for ; Wed, 7 Dec 2005 17:27:05 +0000 (GMT) (envelope-from drew@mykitchentable.net) Received: from relay02.roc.ny.frontiernet.net (relay02.roc.ny.frontiernet.net [66.133.182.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id C829D43D80 for ; Wed, 7 Dec 2005 17:26:48 +0000 (GMT) (envelope-from drew@mykitchentable.net) Received: from filter04.roc.ny.frontiernet.net (filter04.roc.ny.frontiernet.net [66.133.183.71]) by relay02.roc.ny.frontiernet.net (Postfix) with ESMTP id 750463709CC; Wed, 7 Dec 2005 17:26:47 +0000 (UTC) Received: from relay02.roc.ny.frontiernet.net ([66.133.182.165]) by filter04.roc.ny.frontiernet.net (filter04.roc.ny.frontiernet.net [66.133.183.71]) (amavisd-new, port 10024) with LMTP id 22125-01-69; Wed, 7 Dec 2005 17:26:47 +0000 (UTC) Received: from blacklamb.mykitchentable.net (67-137-46-178.dsl2.elk.ca.frontiernet.net [67.137.46.178]) by relay02.roc.ny.frontiernet.net (Postfix) with ESMTP id 1EA2D370A3A; Wed, 7 Dec 2005 17:26:45 +0000 (UTC) Received: from [192.168.25.6] (unknown [192.168.25.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by blacklamb.mykitchentable.net (Postfix) with ESMTP id 320181546C9; Wed, 7 Dec 2005 09:26:44 -0800 (PST) Message-ID: <43971B54.9070907@mykitchentable.net> Date: Wed, 07 Dec 2005 09:26:44 -0800 From: Drew Tomlinson User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Werther Pirani References: <7.0.0.16.2.20051203201101.061b5dd8@msdi.ca> <4392F9CA.2050808@nexgo.de> In-Reply-To: <4392F9CA.2050808@nexgo.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-2.3.2 (20050629) at filter04.roc.ny.frontiernet.net Cc: freebsd-questions@freebsd.org 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: Wed, 07 Dec 2005 17:27:05 -0000 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