Open blak3r opened 11 years ago
I'm currently using this script https://github.com/trustmaster/SugarAsterisk/blob/master/init.d/asterisk_logger
It ensures the logger is started after mysql, apache and asterisk (otherwise it would fail to start on boot). And it doesn't kill all PHP processes on stop, it only kills asteriskLogger. Tested on Debian and Ubuntu.
Thanks for the script @trustmaster
I used it this weekend on a centos box. I'm not sure it was entirely necessary but I added
# chkconfig: 2345 80 30
I pushed your script with my one addition to https://raw.github.com/blak3r/yaai/master/misc/asterisk_logger
I found that despite changing some lines to try and make it start up as the last service. The soap connection was still failing and as a result "die"ing. I commited some changes to asteriskLogger to make it keep retrying the soap login until it's able to connect so that just makes it a little more resilient to working as a daemon.
@trustmaster I'm going to update the usermanual to include these instructions below. Do you see anything wrong with them? perhaps chmod should be something different? and perhaps the update-rc.d line doesn't need the start and stop stuff since it's set in the comments in the script?
Here are the steps I took for installing it as a service on centos.
misc/asterisk_logger
chmod 755 /etc/init.d/asterisk_logger
/etc/init.d/asterisk_logger
in your editor of choice
chkconfig --add asterisk_logger
update-rc.d -f asterisk_logger start 80 2 3 4 5 . stop 30 0 1 6 .
To test that you set up the script properly after step 4, you can run /etc/init.d/asterisk_logger start
if you have errors you'll most likely see them on the console. You can also do tail -f
Looks fine. The start/stop part is good to make sure it works on all Debian/Ubuntu versions.
Great. Thanks for looking it over. I'll put it in the User Manual now.
On Wed, Oct 3, 2012 at 1:05 AM, Vladimir Sibirov notifications@github.comwrote:
Looks fine. The start/stop part is good to make sure it works on all Debian/Ubuntu versions.
— Reply to this email directly or view it on GitHubhttps://github.com/blak3r/yaai/issues/72#issuecomment-9095874.
Has anyone successfully got asteriskLogger running as a daemon on linux? Looking for some feedback before I gave it a try on a customers box.
There is a script included in the package here: https://github.com/blak3r/yaai/blob/master/misc/asteriskLoggerService.txt
That can be used, I've never installed a daemon like this before... According to http://bitnami.org/article/how-to-install-services-on-linux you do something like:
Except replace all the references to bitnami-drupal with asteriskLogger.ctl or whatever you named the script.
@trustmaster