Date: Tue, 13 May 2003 22:30:46 -0500 From: "Scot W. Hetzel" <hetzels@westbend.net> To: "Lucky Green" <shamrock@cypherpunks.to> Cc: freebsd-current@freebsd.org Subject: Re: Port startup scripts under rcNG? Message-ID: <098501c319c9$3559bbe0$13fd2fd8@Admin02> References: <003b01c316d2$9f58dc50$6a01a8c0@VAIO650>
next in thread | previous in thread | raw e-mail | index | archive | help
From: "Lucky Green" <shamrock@cypherpunks.to> > What is the correct place in the FreeBSD file system for a Port startup > script that executes a program as a specific user under rcNG? And where > can I find a sample of such a script? > An example of a combined rcNG/OG script is in security/cyrus-sasl. Your rcNG portion of the script may look like the following: name="mydaemon" rcvar=`set_rcvar` mydaemon_user="testuser" command="${prefix}/sbin/${name}" pidfile="/var/run/${name}.pid" load_rc_config $name run_rc_command "$1" by adding mydaemon_user to the rcNG portion of the script, we execute ${command}as that user. For more info on the variables available to run_rc_command, look at it's entry in /etc/rc.subr. Scot
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?098501c319c9$3559bbe0$13fd2fd8>