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

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Mar 8 10:03:04 CST 2010


The following issue has been UPDATED. 
====================================================================== 
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:                   minor
Priority:                   normal
Status:                     acknowledged
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-08 10:03 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-08 10:03 lmadsen        Severity                 major => minor      
======================================================================




More information about the asterisk-bugs mailing list