Date: Sun, 14 Nov 2004 18:12:34 -0800 From: Tabor Kelly <tkelly-freebsd-questions@taborandtashell.net> To: freebsd-questions@freebsd.org Subject: How to start a daemon (specifically svnserve) as a specific user in /etc/rc.local Message-ID: <41981092.2080901@taborandtashell.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41981092.2080901>