From owner-freebsd-questions@FreeBSD.ORG Thu Dec 14 10:41:53 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9310E16A505 for ; Thu, 14 Dec 2006 10:41:53 +0000 (UTC) (envelope-from work@ashleymoran.me.uk) Received: from mercureh.reacthosting.com (reacthosting.com [195.177.245.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FB0E43CA5 for ; Thu, 14 Dec 2006 10:40:17 +0000 (GMT) (envelope-from work@ashleymoran.me.uk) Received: from hosta.jigsawfinance.com ([213.106.224.113] helo=[192.168.0.34]) by mercureh.reacthosting.com with esmtpa (Exim 4.63 (FreeBSD)) (envelope-from ) id 1Guo29-000DMG-Ht for freebsd-questions@freebsd.org; Thu, 14 Dec 2006 10:41:49 +0000 Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <9EF4201C-AF13-4659-AD7A-28C077DBAA5B@ashleymoran.me.uk> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: freebsd-questions@freebsd.org From: Ashley Moran Date: Thu, 14 Dec 2006 10:41:48 +0000 X-Mailer: Apple Mail (2.752.3) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - mercureh.reacthosting.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [26 6] X-AntiAbuse: Sender Address Domain - ashleymoran.me.uk X-Source: X-Source-Args: X-Source-Dir: Subject: rc.d script for processes started with /usr/bin/env X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 10:41:53 -0000 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"