On Tue, Oct 27, 2009 at 12:04 PM, Scott Lawrence
<[email protected]>wrote:

> On Tue, 2009-10-27 at 11:15 -0400, Robert Joly wrote:
> > > Looking in sipXopenfire/sipxopenfire.sh.in, there is this
> > > assignment for use as a temporary directory:
> > >
> > > TMP_DIR="/tmp"
> > >
> > > I think it would be preferable to use SIP_TMPDIR as the
> > > temporary directory via:
> > >
> > > TMP_DIR="@SIPX_TMPDIR@"
> > >
> > >
> > > Also, looking at where this variable is used:
> > >
> > >     echo "conf.d...@sipx_confdir@" > ${TMP_DIR}/sipx.properties
> > >     echo "openfire.home=${OPENFIRE_HOME}" >>
> > > ${TMP_DIR}/sipx.properties
> > >     exec ${OPENFIRE_HOME}/${OPENFIRE} start
> > >
> > > I see that the code writes configuration information into
> > > ${TMP_DIR}/sipx.properties, but I don't see what directs
> > > Openfire to read that particular file -- is it hard-coded in
> > > the Openfire executable?
> >
> > Yes it is.  sipXopenfire goes to look in /tmp for its properties file.
>
> This doesn't sound correct - the whole point of temp directories is that
> you can delete what's in them.  Why is configuration data in a tmp
> directory?  It should be in $SIPX_CONFDIR
>


It is a temporary holding place. The startup script cannot pass the
information because we are wrapping the openfire startup script.

The plugin reads it from a "well known" place. The wrapper to the startup
script, (i.e. script that invokes the actual openfire script) places some
information there. It is only relevant from the point of startup to the
point where the plugin begins execution. It provides the root of the sipx
install to the startup portion of the plugin. After that it can be safely
deleted.

It can be SIPX_CONFDIR but how can we pass the location of SIPX_CONFDIR to
that plugin? It could be either /etc/sipxpbx or /usr/local/sipx/etc/sipxpbx



Ranga


>
> _______________________________________________
> sipx-dev mailing list [email protected]
> List Archive: http://list.sipfoundry.org/archive/sipx-dev
> Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
> sipXecs IP PBX -- http://www.sipfoundry.org/
>



-- 
M. Ranganathan
_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/

Reply via email to