Re: cd and run app from rc.local

2011-10-06 Thread Alexander Hall

On 10/06/11 15:17, Steve wrote:

Hi,
Can someone please point me in the right direction.

I am trying to start
a ruby rails app from rc.local by calling a script.

The script simply changes
directory and executes the app
The script works outside of rc.local

I
understand this is probably unix 101 but I cant find it.


Check your PATH maybe?



Thanks




Re: cd and run app from rc.local

2011-10-06 Thread Stuart Henderson
On 2011-10-06, Steve  wrote:
> Hi,
> Can someone please point me in the right direction.
>
> I am trying to start
> a ruby rails app from rc.local by calling a script.
>
> The script simply changes
> directory and executes the app
> The script works outside of rc.local
>
> I
> understand this is probably unix 101 but I cant find it.
>
> Thanks
>

Have the script dump the environment variables (set >> /tmp/foo)
and compare the difference between running from rc.local and from
the shell. Pay particular attention to things like PATH.



Re: cd and run app from rc.local

2011-10-06 Thread Norman Golisz
On Thu Oct  6 2011 06:17, Steve wrote:
> Hi,
> Can someone please point me in the right direction.
[...]
> I
> understand this is probably unix 101 but I cant find it.

Please read and understand rc.local(8) and [1].

In general you have two options:
- add your script to rc.local(8),
- create a rc.d(8) script which has a path to your script in the variable
  "daemon" and add its name to rc_scripts in rc.conf.local.
  See rc.d(8) and rc.subr(8).

[1] http://openbsd.org/faq/faq10.html#rc



cd and run app from rc.local

2011-10-06 Thread Steve
Hi,
Can someone please point me in the right direction.

I am trying to start
a ruby rails app from rc.local by calling a script.

The script simply changes
directory and executes the app
The script works outside of rc.local

I
understand this is probably unix 101 but I cant find it.

Thanks