(Solved)

----------------------------------------

From: "Luis Morales" <[email protected]>

Sent: Tuesday, January 17, 2012 3:20 PM

To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
<[email protected]>

Subject: Re: [asterisk-users] /etc/init.d script and calling asterisk 
command line.


Why not try include into startup/down init script of asterisk ?


Regards,


On Tue, Jan 17, 2012 at 9:41 AM, Bryant Zimmerman <[email protected]> 
wrote:

> I have written a program that monitors asterisk to make sure my peers 
and

> channels are all in good order. The program calls asterisk once a min 
and

> then parses the output.  The program works fine when launched from the

> command line. I then wrote a script to launch the program with the hope 
of

> launching it on boot up from /etc/init.d. When I log into a terminal 
session

> and run the script I am able to start/stop/status on the program and all 
is

> good. When I copy the same script to the /etc/init.d folder and run it 
the

> program fails to be able to access the asterisk bin.

> In all three cases I am logged in as root. The script is owned by root 
and

> all it's permissions set.   Anyone have any idea why running my startup

> script from the /etc/init.d folder would act differently?

>

> I am running asterisk 1.8.x, On opensuse 11.x. The startup script is

> launching a mono application.

>

> Any ideas would be appreciated.

>

> Thanks

>

> Bryant

>

> --

-- 

----------------------------------------------------------------------------
-----

Luis Morales


I have solved my issue. Danny and several others suggested that it might 
have something to do with environment settings when running form the init.d 
folder and that is what it turned out to be. I could not get to the 
asterisk binary with the method I was using. I modified the methods path 
and my code started to work. 


Thanks all for your help. 

Bryant
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to