Hi, I'm a newbie to the list, but have been screwing around with Asterisk for the last 6 months or so (on a purely experimental basis so far). I'm not a linux expert by any stretch, (I'm a Mac OS X user), so I'm unsure where the line is drawn in terms of Linux issues or Asterisk issues. At present, I have to manually start Asterisk from the command line, but I'd like to have it automatically start up (and in the correct mode) at startup. For now, the server is running as a workstation, so I only need it to run as a background daemon, but in the near future, we're going to run Asterisk of a dedicated racked server, which we would only want to run Asterisk, and there bare minimums required - as far as I'm aware, you could start Asterisk very early on in the boot-up process. Can anybody guide me in configuring the system to start Asterisk from bootup... Probably a highly remedial question - but you've got to start somewhere! Regards, Ad.
On Tue, Dec 23, 2003 at 12:18:10PM +0000, Adthrawn wrote:> Hi, > > Can anybody guide me in configuring the system to start Asterisk from > bootup... Probably a highly remedial question - but you've got to start > somewhere!If you use screen(1), you can do screen -d -m to start asterisk, and able to reattach to to it using screen -d -r. A sample would be like screen -d -m /path/to/asterisk -vvvvvgc> > Regards, > Ad. >
Hi, In rc.local I added the line /etc/rc.d/run-asterisk I then created a small script of 2 lines called run-asterisk #!/bin/sh /usr/sbin/asterisk do a chmod 755 on the file and reboot. The Asterisk server then starts at every reboot. Regards Dave -----Original Message----- From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users-admin@lists.digium.com]On Behalf Of Adthrawn Sent: 23 December 2003 12:18 To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] Auto Starting Asterisk Hi, I'm a newbie to the list, but have been screwing around with Asterisk for the last 6 months or so (on a purely experimental basis so far). I'm not a linux expert by any stretch, (I'm a Mac OS X user), so I'm unsure where the line is drawn in terms of Linux issues or Asterisk issues. At present, I have to manually start Asterisk from the command line, but I'd like to have it automatically start up (and in the correct mode) at startup. For now, the server is running as a workstation, so I only need it to run as a background daemon, but in the near future, we're going to run Asterisk of a dedicated racked server, which we would only want to run Asterisk, and there bare minimums required - as far as I'm aware, you could start Asterisk very early on in the boot-up process. Can anybody guide me in configuring the system to start Asterisk from bootup... Probably a highly remedial question - but you've got to start somewhere! Regards, Ad. _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users
An even better way to get asterisk started is to use the init scripts provided with asterisk and the zaptel kernel modules. cp /usr/src/asterisk/init.asterisk /etc/init.d/asterisk cp /usr/src/zaptel/init.zaptel /etc/init.d/zaptel Then do the proper linking, etc to get asterisk to start in your current run level. -sb -----Original Message----- From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users-admin@lists.digium.com]On Behalf Of David J Carter Sent: Tuesday, December 23, 2003 7:38 AM To: asterisk-users@lists.digium.com Subject: RE: [Asterisk-Users] Auto Starting Asterisk Hi, In rc.local I added the line /etc/rc.d/run-asterisk I then created a small script of 2 lines called run-asterisk #!/bin/sh /usr/sbin/asterisk do a chmod 755 on the file and reboot. The Asterisk server then starts at every reboot. Regards Dave -----Original Message----- From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users-admin@lists.digium.com]On Behalf Of Adthrawn Sent: 23 December 2003 12:18 To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] Auto Starting Asterisk Hi, I'm a newbie to the list, but have been screwing around with Asterisk for the last 6 months or so (on a purely experimental basis so far). I'm not a linux expert by any stretch, (I'm a Mac OS X user), so I'm unsure where the line is drawn in terms of Linux issues or Asterisk issues. At present, I have to manually start Asterisk from the command line, but I'd like to have it automatically start up (and in the correct mode) at startup. For now, the server is running as a workstation, so I only need it to run as a background daemon, but in the near future, we're going to run Asterisk of a dedicated racked server, which we would only want to run Asterisk, and there bare minimums required - as far as I'm aware, you could start Asterisk very early on in the boot-up process. Can anybody guide me in configuring the system to start Asterisk from bootup... Probably a highly remedial question - but you've got to start somewhere! Regards, Ad. _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users
> At present, I have to manually start Asterisk from the command line, > but I'd like to have it automatically start up (and in the correct > mode) at startup. > > Can anybody guide me in configuring the system to start Asterisk from > bootup... Probably a highly remedial question - but you've > got to start > somewhere!I actually use an entry in my /etc/inittab for asterisk. x:2345:respawn:/usr/sbin/asterisk -f -q It starts when I boot, and I can open a console to it with: asterisk -rvvv Another nice advantage to this is that if I want to restart asterisk completely I only have to issue a 'stop now' command and it will respawn after it exits. -- Tony Kava Network Administrator Pottawattamie County, Iowa
Hi Chris, In this situation, how do I modprobe ztdumy before * get started ? SW Message: 6 Date: Tue, 23 Dec 2003 09:33:07 -0800 (PST) From: Chris Albertson <chrisalbertson90278@yahoo.com> Subject: Re: [Asterisk-Users] Auto Starting Asterisk To: asterisk-users@lists.digium.com Reply-To: asterisk-users@lists.digium.com Look in the directory /etc/init.d (/etc/rc.d/init.d on some systems) You put a script in there called "asterisk". There is a sample called "asterisk.init" in the source. copy it to /etc/init.d/asterisk You may want to study the other files in /etc/init.d to see how they work. Next read the "chkconfig" man page and see way you'd want to type "chkconfig --add asterisk; chkconfig asterisl on" Finally to start asterisk you can type "./asterisk start" You may also want to re-boot the computer to verify that asterisk does start automatically