[VoIP] Asterisk start on boot with Debian Linux

Donald Froula dfroula at sbcglobal.net
Fri Sep 14 12:47:15 CDT 2007


The command is used to set autostart was:

"update-rc.d rc.debian.asterisk start 99 2 3 4 5 .
stop 1 0 1 6 ."

I left out the word "stop" in my first example. The
spaces between the periods and other characters are
required.

Don

--- Donald Froula <dfroula at sbcglobal.net> wrote:

> I figured out how to run Asterisk at boot up, but
> only
> after lots of false starts.
> 
> Debian requires a startup script to be placed in the
> directory /etc/init.d. The Asterisk source
> distribution comes with a working script in the
> "contrib/init.d" sub-directory, called
> rc.debian.asterisk. I copied this to /etc/init.d and
> edited it to modprobe my zaptel drivers and run
> ztcfg
> to bring up the interfaces.
> 
> Debian then requires you to run the command
> "update-rc.d" to set up the rules for running the
> script in the various run levels.
> 
> I used the following command:
> 
> "update-rc.d rc.debian.asterisk start 99 2 3 4 5 . 1
> 0
> 1 6 ."
> 
> This sets up the script to run Asterisk as the last
> process when booting in runlevels 2 3 4 and 5, the
> normal run levels. It also tells Debian to kill off
> Asterisk the first thing when switching to runlevels
> 0, 1 and 6. 0 and 6 are for system halt and
> shutdown.
> Level 1 is single-user "safe" mode.
> 
> The problem I had was that I had been running
> Asterisk
> in single-user "safe" mode. I did this to avoid
> launching the GUI when booting up. This will never
> work, as Debian kills all daemons in single-user,
> runlevel 1.
> 
> To set things right, I entered the following command
> to inhibit running the GUI at boot in the normal run
> levels.
> 
> "update-rc.d -f GDM remove"
> 
> I then changed the /boot/grub/menu.lst to default
> back
> to normal mode at boot (I had the order of the menu
> items swapped to default to single-user mode).
> 
> Now, Asterisk starts up as a daemon at boot time. If
> your BIOS supports reboot on power-failure, it makes
> a
> very robust setup.
> 
> Note that this is all specific to Debian Linux.
> 
> Hope this helps someone.
> 
> Best,
> 
> Don
> 
> 
> --- Donald Froula <dfroula at sbcglobal.net> wrote:
> 
> > I'm still trying to figure how to load all the
> > zaptel
> > drivers, start zaptel, and start asterisk at boot.
> > I've played with adding a shell script in
> > /etc/init.d,
> > with a softlink from /etc/rc1.d, but can't get
> this
> > to
> > work. Any ideas?
> > 
> >
> _______________________________________________
> VoIP mailing list
> VoIP at ckts.info
> http://lists.ckts.info/mailman/listinfo/voip
> Project Web Page: http://www.ckts.info/
> 



More information about the VoIP mailing list