From owner-freebsd-questions@FreeBSD.ORG Mon Nov 15 02:12:42 2004 Return-Path: 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 1C45F16A4CE for ; Mon, 15 Nov 2004 02:12:42 +0000 (GMT) Received: from outside.taborandtashell.net (sub18-33.member.dsl-only.net [63.105.18.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AD9843D45 for ; Mon, 15 Nov 2004 02:12:39 +0000 (GMT) (envelope-from tkelly-freebsd-questions@taborandtashell.net) Received: (qmail 79659 invoked from network); 14 Nov 2004 18:12:36 -0800 Received: from unknown (HELO ?192.168.0.9?) (tkelly@192.168.0.9) by 192.168.0.2 with AES256-SHA encrypted SMTP; 14 Nov 2004 18:12:36 -0800 Message-ID: <41981092.2080901@taborandtashell.net> Date: Sun, 14 Nov 2004 18:12:34 -0800 From: Tabor Kelly User-Agent: Mozilla Thunderbird 0.9 (X11/20041112) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: How to start a daemon (specifically svnserve) as a specific user in /etc/rc.local X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: tkelly-freebsd-questions@taborandtashell.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2004 02:12:42 -0000 Hello, I just installed subversion, and I want to start the standalone subversion server (svnserve) on every reboot. The command I need to execute is: svnserve -d -r /usr/local/repositories I created a user called subversiond, with the shell in /etc/passwd set to /nonexistent. If I am logged into the system, I can use the following commands to start the subversion server as subversiond: su -m subversiond svnserve -d -r /usr/local/repositories exit However, I have not had any luck automating this. What I tried was placing: /usr/local/repositories/subversiond.sh in /etc/rc.local, and creating the following executable file /usr/local/repositories/subversiond.sh: #!/bin/sh umask 022 #just to make sure su -m subversiond svnserve -d -r /usr/local/repositories exit #note: I added these exit's when the script exit # didn't work without them, but it still doesn't work However, if I reboot and do a 'ps -axu | grep "subversiond"' the only process that I see is "_su -m (csh)". I would appreciate any help/pointers you could give me. Thank You, Tabor Kelly