From owner-freebsd-questions@FreeBSD.ORG Thu Sep 4 11:36:54 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 B07F3106564A for ; Thu, 4 Sep 2008 11:36:54 +0000 (UTC) (envelope-from sonic2000gr@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 3A0C48FC23 for ; Thu, 4 Sep 2008 11:36:53 +0000 (UTC) (envelope-from sonic2000gr@gmail.com) Received: by ey-out-2122.google.com with SMTP id 6so1321141eyi.7 for ; Thu, 04 Sep 2008 04:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=aBst/x2eK82xD4CCcbortND8ozKNJg333UvFhCnEhIg=; b=PnFchaj8kZuOuJF+ouiTv7jXG7zf3vu5cyMksr2o97TAPqI4xpB/dwR7/peK5EKDcX Yve4R1PXimP5xLxFppaJaD/eDC7fNcx9d7TGU40NkjbHZmIAinvZIYOlsw5W6uZGIrHv tJGBlkoTPAb9DFQyygKlglzou31coBqG1Lf9k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=oXdz/ZT6n8I1dmuobU1DDssM559pft/mV4PaG6jS3AaJGXBA5ugJyftXdohKrb9ztY JOtkb28MnCegMWWW6o6qb8+7RhRqp+0y8N6E6w0Tzncv0Md9bi5L3kckI5MuSNKoknAV RBQ3xfG41cH0kX3DYz50URlzXmVESIDGM/CB8= Received: by 10.210.41.14 with SMTP id o14mr11810413ebo.16.1220528212768; Thu, 04 Sep 2008 04:36:52 -0700 (PDT) Received: from joshua.freebsdgr.org ( [85.72.66.118]) by mx.google.com with ESMTPS id g17sm8464724nfd.3.2008.09.04.04.36.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 04 Sep 2008 04:36:52 -0700 (PDT) Message-ID: <48BFC851.2080104@gmail.com> Date: Thu, 04 Sep 2008 14:36:49 +0300 From: Manolis Kiagias User-Agent: Thunderbird 2.0.0.16 (X11/20080806) MIME-Version: 1.0 To: =?ISO-8859-2?Q?Sa=B9a_Stupar?= References: <3bd584700067958b3d0e6b681c98a709.squirrel@posta.homelinux.net> In-Reply-To: <3bd584700067958b3d0e6b681c98a709.squirrel@posta.homelinux.net> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: Automatically starting user programs on boot 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, 04 Sep 2008 11:36:54 -0000 Saša Stupar wrote: > Hi! > > On my FBSD 7 server I also use screen with rtorrent. In case of server > reboot (power outage, server goes on UPS then power down) the user need > manually to login, then start screen and then rtorrent. Is it possible to > start this procedure automatically and of course as certain user and not > as root? > I was thinking about .startup file or something in users home directory. > > Regards, > Sasa > > cron(8) seems to be a good candidate for this. Have a look at crontab(5). You can use @reboot to execute your script every time your PC starts. Just make sure your script sets the environment (PATH and so on) correctly.