[asterisk-bugs] [Asterisk 0016979]: contributed init.d file has wrong pid location

Asterisk Bug Tracker noreply at bugs.digium.com
Sat Mar 6 21:52:42 CST 2010


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16979 
====================================================================== 
Reported By:                jw-asterisk
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16979
Category:                   Core/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.2.5 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-03-06 21:52 CST
Last Modified:              2010-03-06 21:52 CST
====================================================================== 
Summary:                    contributed init.d file has wrong pid location
Description: 
In contrib/init.d/rc.redhat.asterisk the location of the pid file doesn't
match what is in the default asterisk.conf.

In asterisk.conf there is a "astrundir=/var/run/asterisk" therefore by
default the asterisk pid will be stored in /var/run/asterisk/asterisk.pid.

Therefore in contrib/init.d/rc.redhat.asterisk there should be a line:

<pre>
   # pidfile: /var/run/asterisk/asterisk.pid
</pre>

But unfortunately the killproc function will not know where the pid is
stored.  So the following should be added/changed also:

<pre>
   piddir=`awk '$1=="astrundir"{print $3}' $AST_CONFIG`
   ...
   killproc -p $piddir/asterisk.pid `basename $DAEMON`
</pre>

Otherwise asterisk will never get terminated properly.



====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-03-06 21:52 jw-asterisk    New Issue                                    
2010-03-06 21:52 jw-asterisk    Asterisk Version          => 1.6.2.5         
2010-03-06 21:52 jw-asterisk    Regression                => No              
2010-03-06 21:52 jw-asterisk    SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list