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

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jun 2 13:20:33 CDT 2010


The following issue has been set as DUPLICATE OF issue 0015691. 
====================================================================== 
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:                       SWP-1046 
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-06-02 13:20 CDT
====================================================================== 
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.



======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
duplicate of        0015691 [patch] Modify init-scripts for better ...
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-06-02 13:20 pabelanger     Relationship added       duplicate of 0015691
======================================================================




More information about the asterisk-bugs mailing list