[VoIP] Asterisk start on boot with Debian Linux
John Novack
jnovack at stromberg-carlson.org
Fri Sep 14 18:50:12 CDT 2007
Donald Froula wrote:
> >From what I read, Debian does things quite differently
> from most other Linux distributions.
>
And for something even more different, try DSL
Damn Small Linux
I have installed it on a thin client HP 5515, and have found
documentation for DSL wanting. It looks as if I live long enough to get
it configured, It will run Asterisk, possibly better than the router
setup. It has the right USB ports, an 800 Mhz processor, and if you find
the correct one one PCI slot.
I believe any of the HP thin clients, not just the Linux one, can work.
Anyone done anything with DSL?
John Novack
> The Debian solution also will restart Asterisk if the
> process dies. The script must be written properly for
> this to work. The sample script provided with Asterisk
> does support restarts. I tested this by killing off
> the Asterisk process.
>
> Don
>
> --- Greg Blakely <greg at vyger.net> wrote:
>
>
>> I also have my asterisk start at boot-up (Fedora),
>> but I do it through
>> /etc/inittab.
>>
>> That way, if it dies, it will restart.
>>
>> Here's what it looks like, a line by itself, all the
>> way at the bottom
>> of the file:
>>
>> # Start Asterisk
>> ax:2345:respawn:/usr/sbin/asterisk -cq
>>
>>
>>
>>
>>
>>> -----Original Message-----
>>> From: voip-bounces at ckts.info
>>>
>> [mailto:voip-bounces at ckts.info]
>>
>>> On Behalf Of Donald Froula
>>> Sent: Friday, September 14, 2007 11:48 AM
>>> To: voip at ckts.info
>>> Subject: [VoIP] Asterisk start on boot with Debian
>>>
>> Linux
>>
>>> 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/
>>>
>>>
>>>
>> _______________________________________________
>> VoIP mailing list
>> VoIP at ckts.info
>> http://lists.ckts.info/mailman/listinfo/voip
>> Project Web Page: http://www.ckts.info/
>>
>>
>
> _______________________________________________
> VoIP mailing list
> VoIP at ckts.info
> http://lists.ckts.info/mailman/listinfo/voip
> Project Web Page: http://www.ckts.info/
>
>
--
Dog is my co-pilot
More information about the VoIP
mailing list