[asterisk-users] /etc/asterisk/startup.d

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat May 23 11:31:34 CDT 2009


On Sat, May 23, 2009 at 04:43:52PM +0200, Philipp Kempgen wrote:
> Tzafrir Cohen schrieb:
> > On Fri, May 22, 2009 at 01:33:59PM +0200, Philipp Kempgen wrote:
> >> Does anybody think it would make sense for /etc/init.d/asterisk
> >> to run /etc/asterisk/startup.d/*.sh on start like safe_asterisk
> >> did?
> > 
> > What would you put there?
> 
> Scripts to generate Asterisk config files in /etc/asterisk I guess.
> Or scripts to log warnings to syslog if the configuration is insecure
> (MySQL does that on Debian).

When exactly should those be run?

E.g.: asterisk -rx 'restart now' does not get them run. Do you want to
guarantee some script to be run before Asterisk is started?

Should it be run on a reload? On a logger-reload action?

> Or maybe scripts to open some ports on a firewall. Well, no, there
> should be stop scripts as well then, so forget about the firewall.
> OTOH: The scripts could be called with an argument just like init
> scripts (start|stop|restart|...).
> 
> I'm not quite sure if that would be a useful thing to have or if
> such tasks should rather be done by interdependent init scripts, i.e.
> Required-Start, Required-Stop, Should-Start, Should-Stop headers.
> 
> > When should it be run?
> 
> Right before /etc/init.d/asterisk is about to (re?)start asterisk.
> 
> > As which user?
> 
> Good question. Obviously either as root because /etc/init.d/asterisk
> is run by root or as Asterisk's runuser which is likely to be one
> of root or asterisk. root would buy us more flexibility :-)

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list