From owner-freebsd-questions@FreeBSD.ORG Wed Apr 9 18:42:17 2008 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 988E41065676 for ; Wed, 9 Apr 2008 18:42:17 +0000 (UTC) (envelope-from erik@cepheid.org) Received: from mail.cepheid.org (aleph.cepheid.org [72.232.60.94]) by mx1.freebsd.org (Postfix) with ESMTP id 78D018FC1C for ; Wed, 9 Apr 2008 18:42:17 +0000 (UTC) (envelope-from erik@cepheid.org) Received: by mail.cepheid.org (Postfix, from userid 1006) id 948EF9B4003; Wed, 9 Apr 2008 13:42:16 -0500 (CDT) Date: Wed, 9 Apr 2008 13:42:16 -0500 From: Erik Osterholm To: FreeBSD Mailing Lists Message-ID: <20080409184216.GA16393@aleph.cepheid.org> Mail-Followup-To: Erik Osterholm , FreeBSD Mailing Lists , Wael Nasreddine References: <20080408220005.GA23508@phoenix.nasreddine.info> <20080409005217.GA97058@aleph.cepheid.org> <20080409010503.GB15556@phoenix.nasreddine.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080409010503.GB15556@phoenix.nasreddine.info> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: Screen inside Jails + su 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, 09 Apr 2008 18:42:17 -0000 On Wed, Apr 09, 2008 at 03:05:03AM +0200, Wael Nasreddine wrote: > This One Time, at Band Camp, Erik Osterholm said, On Tue, Apr 08, 2008 at 07:52:17PM -0500: > > On Wed, Apr 09, 2008 at 12:00:05AM +0200, Wael Nasreddine wrote: > > > The common way for a user to run a program at startup is to use > > cron with the special @reboot directive instead of giving it a > > time to run a job. > > http://www.freebsd.org/doc/en/books/handbook/configtuning-starting-services.html > > Thank you for pointing that out, could you please give me an example > I haven't found on that page... Sure. At your shell prompt, type: man 5 crontab You'll find the man page for the crontab file, which includes multiple examples of cron entries. All of those use the time specification, though, rather than the @reboot keyword. An example using @reboot: @reboot /usr/local/bin/screen -d -m Rtorrent You can edit the crontab for the user with this command at your shell prompt: crontab -u username -e This will dump you into your editor, editing the crontab file for the user "username". Type in the crontab entry (for example, the one I used as an example above), save, and try restarting the jail. Erik