diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-11-02 17:15:31 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-11-02 17:15:31 +0000 |
commit | 14a8c042cd04d0a77b1bcab87701ff6aaf1b2f4f (patch) | |
tree | 572a822b1b5f27c1ba793b4ea4b85c93e79e9c5f /contrib/init.d | |
parent | d107a0e3cf12380364bdb2e94de8e0b26dd6f236 (diff) |
Merged revisions 226811 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r226811 | tilghman | 2009-11-02 11:14:20 -0600 (Mon, 02 Nov 2009) | 8 lines
Don't allow two separate instances of safe_asterisk when restarting from the init script.
(closes issue #14562)
Reported by: davidw
Patches:
Initially 20091022__issue14562.diff.txt uploaded by tilghman (license 14)
Modified to 20091030__Issue14562_diff.txt uploaded by davidw (license 780)
Tested by: davidw
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'contrib/init.d')
-rwxr-xr-x | contrib/init.d/rc.redhat.asterisk | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/init.d/rc.redhat.asterisk b/contrib/init.d/rc.redhat.asterisk index f45f8d7ab..5391c7b0f 100755 --- a/contrib/init.d/rc.redhat.asterisk +++ b/contrib/init.d/rc.redhat.asterisk @@ -99,8 +99,14 @@ start() { stop() { # Stop daemons. + if [ -f $SAFE_ASTERISK ]; then + # Kill safe_asterisk first, to prevent us from starting up 2 instances of safe_asterisk + echo -n $"Stopping safe_asterisk: " + killproc `basename $SAFE_ASTERISK` + echo + fi echo -n $"Shutting down asterisk: " - killproc asterisk + killproc `basename $DAEMON` RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/asterisk echo |