Fedora 10 and Asterisk as a service

All,
I have Asterisk, latest version, installed on Fedora 10. However, everytime I reboot the box the Asterisk service does not start. In order to make it start I have to su root then type asterisk.

I am new to Linux, so, can someone please assist with Asterisk starting on operating system boot?

Thanks,
Mike

Fedora has a tool ntsysv outlined Here That should help.

I install a program called safe_asterisk that will make sure asterisk always stays running,

also make sure that chkconfig --list shows asterisk or safe_asterisk in the runlevel that you are booting up into.
-Christopher

I have looked into the Services Configuration Tool in Fedora and I do not see Asterisk available as a service to configure. Also, I have tried to run the chkconfig --level 35 asterisk command from root and I still do not have any success… I guess that it is my fault for being a windows guy for all these years…

Could you please provide me with more detail as to how I can get the script that will make sure Asterisk is running? If the application fails I would like to have it back up on its own…

Thanks,
Mike

I found the safe_asterisk script and copied to the init.d directory:
cp safe_asterisk /etc/rc.d/init.d/asterisk

I then changed perms to 755:
chmod 755 asterisk

I then ran the chkconfig --list: I did not see asterisk available

I tried chkconfig --add asterisk and got:
service asterisk does not support chkconfig

I also tried the ntsysv command, asterisk did not show as a service there either.

I also looked in the Fedora Services GUI for asterisk, it was not there…

any idea as to how I can get asterisk to show as a service.

Thanks,
Mike

I was able to add Asterisk as a service to Fedora 10 by doing the following:

[b]Copy the safe_asterisk script to the /etc/rc.d/init.d/ directory via this command:
cp safe_asterisk /etc/rc.d/init.d/asterisk

Then, changed perms to 755:
chmod 755 asterisk

Then, vi thesafe_asterisk script and add the following lines:

chkconfig: - 85 15

description: Add Asterisk to the server as a service for start on boot

Then, run:
Chkconfig –add asterisk from the /etc/rc.d/init.d/ directory

Reboot Fedora[/b]

It still does not start…
First of all I have to be root to start the asterisk application… why?

Second the error from the safe_asterisk log is the following:
safe_asterisk[3252]: Asterisk died with code 12.
safe_asterisk[3252]: Automatically restarting Asterisk.

Where is the issue? Permissions? if so, what should they be?

Regards,
Mike

I was able to add Asterisk as a service to Fedora 10 by doing the following:

[b]Copy the safe_asterisk script to the /etc/rc.d/init.d/ directory via this command:
cp safe_asterisk /etc/rc.d/init.d/asterisk

Then, changed perms to 755:
chmod 755 asterisk

Then, vi thesafe_asterisk script and add the following lines:

chkconfig: - 85 15

description: Add Asterisk to the server as a service for start on boot

Then, run:
Chkconfig –add asterisk from the /etc/rc.d/init.d/ directory

Reboot Fedora[/b]

It still does not start…
First of all I have to be root to start the asterisk application… why?

Second the error from the safe_asterisk log is the following:
safe_asterisk[3252]: Asterisk died with code 127.
safe_asterisk[3252]: Automatically restarting Asterisk.

Where is the issue? Permissions? if so, what should they be?

Regards,
Mike

NOTE You must do a “make config” as root after the asterisk install in order for the init scripts to be created.

I did the make config command from within Asterisk before trying to set it as a service. I can launch the application just fine if I su root and type asterisk via teminal. However, I have to be root and I have to manually start the application.

I would like the application to start upon boot of the OS. I just do not know how…

Thanks