<br><div class="gmail_quote">2011/1/23 Tzafrir Cohen <span dir="ltr"><<a href="mailto:tzafrir.cohen@xorcom.com">tzafrir.cohen@xorcom.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On Thu, Jan 20, 2011 at 06:22:23PM +0000, A J Stiles wrote:<br>
> On Thursday 20 Jan 2011, JR Richardson wrote:<br>
> > Hi All,<br>
> ><br>
> > I'm running * 1.6.0.28 on Debian Lenny. The init'd script starts the<br>
> > asterisk daemon not the safe_asterisk daemon so when asterisk is<br>
> > running and I ssh tot he server then 'asterisk -vr' to attach to the<br>
> > asterisk console there are no colors. If I use the safe_asterisk<br>
> > script to start asterisk, the colors are fine when I attach through<br>
> > SSH.<br>
><br>
> I'm running Debian but have been running Asterisk since before there was a<br>
> proper Debian package, and so I ended up writing my own init.d script. See<br>
> attached. No guarantees or anything :)<br>
<br>
</div></div>A number of things I did not like about it:<br>
<br>
1. I don't trust safe_asterisk to properly handle being run twice and<br>
such.<br>
<br>
2. Likewise with daemonization. safe_asterisk is still at the console.<br>
<br>
3. You run asterisk as root. And use /var/run/asterisk.pid . Please use<br>
a non-root user and /var/run/asterisk/asterisk.pid .<br>
<br>
4. On 'restart' you do nothing if the process was not running. That's<br>
not the standard semantics.<br>
<br>
5. Even if a pid file exists, it does not mean that the process listed<br>
in it is your process.<br>
<br>
In short:<br>
<br>
A. Don't re-invent start-stop-daemon.<br>
<br>
B. Let's just move to upstart/systemd so there won't be a need for this<br>
stupid guardian "safe" asterisk.<font color="#888888"><br></font></blockquote><div><br>All these reasons seem fine for me.<br>So the remaining question is "how can we still get colors with ssh console ?".<br>
Is it compliant with start-stop-daemon, for instance ?<br><br>Cheers<br></div></div>