[Home]

Summary:ASTERISK-15761: contributed init.d file has wrong pid location
Reporter:jw-asterisk (jw-asterisk)Labels:
Date Opened:2010-03-06 21:52:42.000-0600Date Closed:2010-06-06 00:31:12
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
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.


Comments:By: Paul Belanger (pabelanger) 2010-06-02 13:21:19

Marking as duplicate.  Please test the patches attached to the other issue.
--
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. Thanks!

By: Digium Subversion (svnbot) 2010-06-06 00:29:51

Repository: asterisk
Revision: 268534

U   trunk/contrib/init.d/rc.redhat.asterisk

------------------------------------------------------------------------
r268534 | tilghman | 2010-06-06 00:29:50 -0500 (Sun, 06 Jun 2010) | 8 lines

Take advantage of variable substitution already in the Makefile to specify the correct location for files in init.d.

(closes issue ASTERISK-15761)
Reported by: jw-asterisk

(issue ASTERISK-14628)
Reported by: itamarjp

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=268534

By: Digium Subversion (svnbot) 2010-06-06 00:31:12

Repository: asterisk
Revision: 268535

_U  branches/1.6.2/
U   branches/1.6.2/contrib/init.d/rc.redhat.asterisk

------------------------------------------------------------------------
r268535 | tilghman | 2010-06-06 00:31:11 -0500 (Sun, 06 Jun 2010) | 15 lines

Merged revisions 268534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r268534 | tilghman | 2010-06-06 00:29:50 -0500 (Sun, 06 Jun 2010) | 8 lines
 
 Take advantage of variable substitution already in the Makefile to specify the correct location for files in init.d.
 
 (closes issue ASTERISK-15761)
  Reported by: jw-asterisk
 
 (issue ASTERISK-14628)
  Reported by: itamarjp
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=268535