Re: rc.d script for processes started with /usr/bin/env
Ashley Moran wrote: > On 14 Dec 2006, at 13:49, [LoN]Kamikaze wrote: >> Are you certain that this is the pidfile used by your server? Are you >> aware that the service is responsible for creating the pidfile, not >> rc.subr? > > Yes, on both counts. Works fine with > > #!/usr/local/bin/ruby > and > command_interpreter="/usr/local/bin/ruby" > > but not > > #!/usr/bin/env ruby > and > command_interpreter="/usr/bin/env" > > > Not that important really (now I've got it working one way), just strange > > > Ashley Maybe env replaces itself with the new process. That would explain this behaviour. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: rc.d script for processes started with /usr/bin/env
On 14 Dec 2006, at 13:49, [LoN]Kamikaze wrote: Are you certain that this is the pidfile used by your server? Are you aware that the service is responsible for creating the pidfile, not rc.subr? Yes, on both counts. Works fine with #!/usr/local/bin/ruby and command_interpreter="/usr/local/bin/ruby" but not #!/usr/bin/env ruby and command_interpreter="/usr/bin/env" Not that important really (now I've got it working one way), just strange Ashley ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: rc.d script for processes started with /usr/bin/env
Ashley Moran wrote: > Hmm I've just tried that and all I get is... > > [EMAIL PROTECTED] ~]# /usr/local/etc/rc.d/prolite_password_server stop > prolite_password_server not running? (check > /var/run/prolite_password_server/prolite_password_server.pid). Are you certain that this is the pidfile used by your server? Are you aware that the service is responsible for creating the pidfile, not rc.subr? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: rc.d script for processes started with /usr/bin/env
On 14 Dec 2006, at 12:08, [LoN]Kamikaze wrote: All you need to do is to set command_interpreter="/usr/bin/env" for more information have a look at rc.subr(8). Hmm I've just tried that and all I get is... [EMAIL PROTECTED] ~]# /usr/local/etc/rc.d/prolite_password_server stop prolite_password_server not running? (check /var/run/ prolite_password_server/prolite_password_server.pid). Thanks for the suggestion though - I was in too much hurry to get it up to go through the rc man pages. Ashley ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: rc.d script for processes started with /usr/bin/env
Ashley Moran wrote: > 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? > All you need to do is to set command_interpreter="/usr/bin/env" for more information have a look at rc.subr(8). ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
rc.d script for processes started with /usr/bin/env
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" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"