<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" &lt;fastonion@gmail.com&gt;<br />
<b>Sent</b>: Tuesday, January 17, 2012 3:20 PM<br />
<b>To</b>: "Asterisk Users Mailing List - Non-Commercial Discussion" &lt;asterisk-users@lists.digium.com&gt;<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 &lt;BryantZ@zktech.com&gt; wrote:<br />
&gt; I have written a program that monitors asterisk to make sure my peers and<br />
&gt; channels are all in good order. The program calls asterisk once a min and<br />
&gt; then parses the output.&nbsp; The program works fine when launched from the<br />
&gt; command line. I then wrote a script to launch the program with the hope of<br />
&gt; launching it on boot up from /etc/init.d. When I log into a terminal session<br />
&gt; and run the script I am able to start/stop/status on the program and all is<br />
&gt; good. When I copy the same script to the /etc/init.d folder and run it the<br />
&gt; program fails to be able to access the asterisk bin.<br />
&gt; In all three cases I am logged in as root. The script is owned by root and<br />
&gt; all it's permissions set.&nbsp;&nbsp; Anyone have any idea why running my startup<br />
&gt; script from the /etc/init.d folder would act differently?<br />
&gt;<br />
&gt; I am running asterisk 1.8.x, On opensuse 11.x. The startup script is<br />
&gt; launching a mono application.<br />
&gt;<br />
&gt; Any ideas would be appreciated.<br />
&gt;<br />
&gt; Thanks<br />
&gt;<br />
&gt; Bryant<br />
&gt;<br />
&gt; --<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>