Summary:ASTERISK-06426: [patch] Asterisk init.d file does not allow for the -C option
Reporter:Leo Burd (leoburd)Labels:
Date Opened:2006-02-26 10:03:08.000-0600Date Closed:2006-03-24 23:10:41.000-0600
Versions:Frequency of
Environment:Attachments:( 0) 20060311__bug6601.diff.txt
( 1) 6601.patch
Description:At least for RedHat Linux systems, the current Asterisk init.d file does not allow users to specify a configuration folder different from /etc/asterisk.  It would be great if the init.d file allowed users to start the Asterisk service with the -C option...
Comments:By: Russell Bryant (russell) 2006-02-27 13:02:08.000-0600

Try this patch

By: Leo Burd (leoburd) 2006-02-28 09:37:52.000-0600

The patch worked partially fine.  The Asterisk service did start looking at the value specified by AST_CONFIG for the new asterisk.conf file.  

However, the init.d/asterisk file keeps checking for the existence of /etc/asterisk ... even if that directory will not be used.  Would it be possible to remove the following lines from init.d/asterisk?  Or at least modify them so that they check for the new file speficied?

Here are the "problem lines":

if ! [ -d /etc/asterisk ] ; then
       echo "ERROR: /etc/asterisk directory not found"
       exit 0



By: Tilghman Lesher (tilghman) 2006-03-11 10:08:09.000-0600

Might as well go for the full set of options

By: Tilghman Lesher (tilghman) 2006-03-13 08:01:48.000-0600

Please test.  This should allow you to place your customizations into /etc/sysconfig/asterisk.

By: Tilghman Lesher (tilghman) 2006-03-24 23:10:41.000-0600

Committed to 1.2; merged to trunk