From owner-freebsd-questions@FreeBSD.ORG Thu May 7 18:23:52 2009 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 4298D106564A for ; Thu, 7 May 2009 18:23:52 +0000 (UTC) (envelope-from xi@borderworlds.dk) Received: from kazon.borderworlds.dk (kazon.borderworlds.dk [213.239.213.48]) by mx1.freebsd.org (Postfix) with ESMTP id 053588FC1E for ; Thu, 7 May 2009 18:23:52 +0000 (UTC) (envelope-from xi@borderworlds.dk) Received: from talaxian.borderworlds.dk (localhost [127.0.0.1]) by kazon.borderworlds.dk (Postfix) with ESMTP id 6E2431711A; Thu, 7 May 2009 20:23:50 +0200 (CEST) Message-ID: <4A032736.4080802@borderworlds.dk> Date: Thu, 07 May 2009 20:23:50 +0200 From: Christian Laursen Organization: The Border Worlds User-Agent: Thunderbird 2.0.0.21 (X11/20090419) MIME-Version: 1.0 To: Nerius Landys References: <560f92640905071057v7d298a68l680182144cc8898f@mail.gmail.com> In-Reply-To: <560f92640905071057v7d298a68l680182144cc8898f@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Run script on boot, as ordinary 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, 07 May 2009 18:23:52 -0000 Nerius Landys wrote: > So there's cron. Is there anything that lets an ordinary user start > his/her programs at bootup of the system? And then run a script when > the system is shutting down? I'm familiar with /etc/rc.d/, but that's > not really what I'm looking for. I gave my friends access to my > FreeBSD server and I want to let them start for example Apache and/or > MySQL on higher ports running as their own user. Starting something at boot is easy enough. The user can just add a line like this to his/her crontab: @reboot /path/to/command At shutdown is not possible via cron though. -- Christian Laursen