?
Solved

Asterisk Not Start At Boot

Posted on 2011-09-11
10
Medium Priority
?
566 Views
Last Modified: 2013-11-12
I've just done a clean install of Ubuntu 11.xx + a new asterisk 1.8.6 install, I put a startup script in /etc/init.d/asterisk (the script is called 'asterisk'), but it won't seem to start on boot, excuse my Linux newbie ignorance, but if i type 'sudo asterisk' in the /etc/init.d folder, it does run, so is it a permissions issue? Does linux know to run these startup scripts without telling it?

0
Comment
Question by:Silas2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 4

Accepted Solution

by:
degaray earned 252 total points
ID: 36518841
Type this to see your permissions

ls -l /the/path/to/asterisk

replace the/path/to/asterisk with the actual path and lets see what your permissions are.

Also, since you are using ubuntu, I would suggest you install asterisk straight from repositories, in the same way you would install other software. It should get you a very stable installation.
0
 
LVL 3

Assisted Solution

by:erictronic
erictronic earned 248 total points
ID: 36518847
It is not enought to have the script in /etc/init.d/. You also need (soft) links in the "runlevel folders" /etc/rc[0-6].d/.

Lookup your default runlevel like this:

grep default /etc/inittab

Let's say it is "3", then create a softlink to your start script ...

ln -s /etc/init.d/asterisk /etc/rc3.d/S99asterisk

and stop script

ln -s /etc/init.d/asterisk /etc/rc3.d/K99asterisk

reboot...
0
 
LVL 28

Assisted Solution

by:FishMonger
FishMonger earned 500 total points
ID: 36519076
You didn't say how you installed asterisk, but I'll assume you did a typical build (i.e., ./configure make and make install).  If that's the case, it sounds like you forgot to do the 'make config' which installs the startup scripts in their proper locations.  So, go back to the build directory and do the 'make config' and reboot, that will be easier and IMO better than manually creating the files.
0
WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

 

Author Comment

by:Silas2
ID: 36522089
Thanks for all of your suggestions.
FishMonger: I'm not sure if i did run the 'make config' so I renamed the /etc/init.d/asterisk file to '.old', ran 'make config' but the 'make config' kept saying links already existed, does this mean I had run it?
erictronic, I ran those commands
ln -s /etc/init.d/asterisk /etc/rc3.d/S99asterisk which seemed to run with no complaint, but still no start on boot.
degray: I ran that command which came back with:
-rwxr-xr-x 1 root root 20672891 2011-09-10 18:27 /usr/sbin/asterisk
0
 

Author Comment

by:Silas2
ID: 36522098
PS if i type sudo /etc/init.d/asterisk, it does start ok.
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 36522808
All of my asterisk installs are on CentOS and besides having the startup scripts in the proper locations, I also need to use the chkconfig command to tell the system which services I want to run at bootup and for which run level(s).  I'm not sure what the equivalent command would be in Ubuntu, but that appears to be what you're missing.
0
 

Author Comment

by:Silas2
ID: 36536720
Sorry I'm so dilatory with this post, its just I'm trying to get this server back together and I deprioritize the startup when its running, then i do a reboot...
I've just installed and run chkconfig and asterisk =234, I think that means its running at three run levels, I don't know what that means about startup?
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 36537062
On all of my installs, asterisk loads on runlevels 2 thru 5.

Are you saying that after using chkconfig, asterisk is now starting during bootup?  
0
 

Author Comment

by:Silas2
ID: 36537580
Err...actually, I am. I've just realised it is running after a reboot. Regarding your comment 2->5, any reason mine might be 234? (I have to say all this runlevel suff is completely new to me coming from Windows)
0
 
LVL 28

Assisted Solution

by:FishMonger
FishMonger earned 500 total points
ID: 36539234
I haven't used Ubuntu yet, but it appears that it doesn't make any distinction between runlevels 2 thru 5 like other typical Linux systems.  So, in your case, it doesn't matter that it's not using runlevel 5.

Here's some info on the meaning of the runlevels.
http://en.wikipedia.org/wiki/Runlevel
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently purchased a Bluetooth headset called the Music Jogger (model BSH10). The control buttons on it look like this: One of my goals is to use it as the microphone and speakers for Skype calls. In that respect, it works well. However, I …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month8 days, 16 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question