Start Asterisk at boot?

Hello, I am running a SuSe 9.3 server. That have Asterisk. Asterisk are working fine/perfect. But what I want to do is to make it start up at boot.

When I have started the computer can I type:
sudo /root/Asterisk-1.0.8/Asterisk

And it goes of. No problem.
But I want it to do that by itself at start up. And as easy as possible so my first thoug was why not put in a script in: /etc/init.d/boot.local?

There did I write:
sudo /root/asterisk-1.0.8/Asterisk
rootpasswd

That dident work as I did think. The Asterisk was succesfully run but it dident manged to get out to the network. Because it had been exicuted before the network card was loadet. So I had to restart Asterisk and then did it work. But I dident work at startup.

I have been trying to place the script in the different placed as rc3.d that loads with the nettwork card and as S99Asterisk so it loads last. But it dosent work. Maybe bacause it do only write this:
sudo /root/asterisk-1.0.8/Asterisk
rootpasswd

But I dont know how to write a good boot script. If someone could help me out here. Would I be extremly happy. :slight_smile:

Thanks for taking your time reading this.
NB: I know I have to many spelling errors.

this is cause you don't need launch asterisk with sudo when you boot up your pc

cause in startup your id is 0 so only execute asterisk

in your boot.local put it
./way/to/asterisk

Right I have done that. It are starting up. But not with the nettwork.
So I cant use it. It are running but not on the nettwork because the nettwork drive hasent been loadet yet. I need to run asterisk after the nettwork driver

hello,

i think best for you to start it in rc.local,

cheers.

is a better ideia put in rc.local

but i never used suse so i don't know if this exist :stuck_out_tongue_winking_eye:

if not try to find the line where your network driver is loaded and put
the ./way/to/asterisk in the next line