From owner-freebsd-questions@FreeBSD.ORG Thu Sep 13 18:21:17 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E0FB16A420 for ; Thu, 13 Sep 2007 18:21:17 +0000 (UTC) (envelope-from sonicy@otenet.gr) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.77]) by mx1.freebsd.org (Postfix) with ESMTP id 960E513C467 for ; Thu, 13 Sep 2007 18:21:16 +0000 (UTC) (envelope-from sonicy@otenet.gr) Received: from atlantis.dyndns.org (athedsl-362911.home.otenet.gr [87.202.145.96]) by kane.otenet.gr (8.13.8/8.13.8/Debian-3) with ESMTP id l8DILDMd020662; Thu, 13 Sep 2007 21:21:14 +0300 Message-ID: <46E97F99.5000904@otenet.gr> Date: Thu, 13 Sep 2007 21:21:13 +0300 From: Manolis Kiagias User-Agent: Thunderbird 2.0.0.5 (X11/20070719) MIME-Version: 1.0 To: jackbarnett@gmail.com References: <46E97E2D.7070300@gmail.com> In-Reply-To: <46E97E2D.7070300@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Freebsd questions Subject: Re: Running process on startup as a user 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: Thu, 13 Sep 2007 18:21:17 -0000 Jack Barnett wrote: > > Using FreeBSD 6.2 x86. > > I have a script called: > > /home/foo/scripts/MyScript.sh > The user is 'foo'. The password is 'bar'. > > What I'm trying to do is run the MyScript.sh command on startup (that > way if the box reboots, then this users process also re-starts it's > self). > > thoughts? > Looks like a good job for a user crontab: Login as the foo user, type: crontab -e Insert the line: @reboot /home/foo/scripts/MyScript.sh Save, exit, you are done. Look at man 5 crontab for more details and possible caveats.