<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt">(Solved)<br />
<span style="font-family: tahoma,arial,sans-serif; font-size: 10pt;"><hr width="100%" size="2" align="center" />
<b>From</b>: "Luis Morales" <fastonion@gmail.com><br />
<b>Sent</b>: Tuesday, January 17, 2012 3:20 PM<br />
<b>To</b>: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users@lists.digium.com><br />
<b>Subject</b>: Re: [asterisk-users] /etc/init.d script and calling asterisk command line.</span><br />
<br />
Why not try include into startup/down init script of asterisk ?<br />
<br />
Regards,<br />
<br />
<br />
On Tue, Jan 17, 2012 at 9:41 AM, Bryant Zimmerman <BryantZ@zktech.com> wrote:<br />
> I have written a program that monitors asterisk to make sure my peers and<br />
> channels are all in good order. The program calls asterisk once a min and<br />
> then parses the output. The program works fine when launched from the<br />
> command line. I then wrote a script to launch the program with the hope of<br />
> launching it on boot up from /etc/init.d. When I log into a terminal session<br />
> and run the script I am able to start/stop/status on the program and all is<br />
> good. When I copy the same script to the /etc/init.d folder and run it the<br />
> program fails to be able to access the asterisk bin.<br />
> In all three cases I am logged in as root. The script is owned by root and<br />
> all it's permissions set. Anyone have any idea why running my startup<br />
> script from the /etc/init.d folder would act differently?<br />
><br />
> I am running asterisk 1.8.x, On opensuse 11.x. The startup script is<br />
> launching a mono application.<br />
><br />
> Any ideas would be appreciated.<br />
><br />
> Thanks<br />
><br />
> Bryant<br />
><br />
> --<br />
-- <br />
---------------------------------------------------------------------------------<br />
Luis Morales<br />
<br />
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. <br />
<br />
Thanks all for your help. <br />
Bryant</span>