Date: Sat, 17 Mar 2001 12:25:43 -0800 From: Dima Dorfman <dima@unixfreak.org> To: "Jason Halbert" <jason@jason-n3xt.org> Cc: questions@freebsd.org Subject: Re: rc.d Message-ID: <20010317202543.3D2C33E1E@bazooka.unixfreak.org> In-Reply-To: <ICEEIHNIIMPDELNLPAGPAELNCBAA.jason@jason-n3xt.org>; from jason@jason-n3xt.org on "Sat, 17 Mar 2001 19:48:04 -0000"
next in thread | previous in thread | raw e-mail | index | archive | help
"Jason Halbert" <jason@jason-n3xt.org> writes: > How do you write an rc.d script to start stuff under a specific user > and not root? I have a ircd and some of my friends run eggdrop bots > and I'd like them to restart under their user name. You can probably use su(1) or sudo(1) (the latter is in the ports). That said, I think it's a bad idea: your friends will be coming up to you to change this stuff when they need to stop running something or start running something new; surely you have better things to do :-). A better solution would be to have each of them set up cron to try to start their processes every 10 or 20 minutes. This way, not only do they get restarted if the machine boots up, but also if they die accidently. For more information, see cron(8) and crontab(1). If you do this, however, be careful about checking whether the process is already running, or you'll end up with one process for every user that did this for every 20 minutes your computer is running. Hope this helps Dima Dorfman dima@unixfreak.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010317202543.3D2C33E1E>