rc.d script for processes started with /usr/bin/env

Ashley Moran work at ashleymoran.me.uk
Thu Dec 14 02:41:53 PST 2006


Hi

I just wrote a little ruby web server for internal use.  I wrote it  
on my mac to deploy on FreeBSD, so I used "#!/usr/bin/env ruby" as  
the shebang.  But when I do that, I can't stop the server with my  
rc.d script (below).  If I change them both to /usr/local/bin/ruby I  
can make it work.

Is it possible to use /usr/bin/env like this?

Thanks
Ashley




#!/bin/sh

. /etc/rc.subr

name="prolite_password_server"
rcvar=`set_rcvar`

load_rc_config $name

prolite_password_server_enable=${prolite_password_server_enable:="NO"}

command="/usr/local/bin/${name}"
command_interpreter="/usr/local/bin/ruby"

prolite_password_server_user=${prolite_password_server_user:-"www"}
prolite_password_server_group=${prolite_password_server_group:-"www"}
pidfile="/var/run/${name}/${name}.pid"

run_rc_command "$1"


More information about the freebsd-questions mailing list