Automatically start Asterisk at boot time

Learned how to do so from this thread.

 <pre class="src src-sh"><span style="color: #b0c4de;">cd</span> ~/Downloads/asterisk/1.8/contrib/init.d <span style="color: #ff4500;">## </span><span style="color: #ff4500;">contrib folder is in source directory</span>

sudo cp rc.debian.asterisk /etc/init.d/asterisk sudo chmod 755 /etc/init.d/asterisk # to set the script as boot update-rc.d asterisk defaults

# to remove the script from boot update-rc.d -f asterisk remove

Modify the /etc/init.d/asterisk:

<pre class="src src-sh"><span style="color: #ff4500;"># </span><span style="color: #ff4500;">Full path to asterisk binary</span>

## DAEMON=ASTERISK_SBIN_DIR/asterisk DAEMON=/usr/sbin/asterisk ## ASTVARRUNDIR=__ASTERISK_VARRUN_DIR__ ASTVARRUNDIR=/var/run/asterisk/ ## ASTETCDIR=__ASTERISK_ETC_DIR__ ASTETCDIR=/etc/asterisk/

About Vinh Nguyen

Statistician

3 comments

  1. Bravo!!!!

    thx a lot 4 this post, i needed to start Asterisk 1.8 automatically on my Ubuntu Server and had no idea as how to do it. Your post did the Trick!!!

    (i still don’t understand starting scripts on linux though, but that’s another issue).

    Gracias mil.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>