blak3r / yaai

SugarCRM Asterisk integration
http://www.sugarforge.org/projects/yaai
GNU General Public License v3.0
84 stars 85 forks source link

asterisk_logger service does not start on boot (Debian) #178

Closed ViktorNova closed 10 years ago

ViktorNova commented 10 years ago

I have found that the root of many problems I've had is due to the asterisk_logger service not starting on boot when set up according to instructions in the wiki.

When it is started manually after booting by doing

sudo service asterisk_logger start

the call popups begin to work perfectly!

By the way, in this journey I've also found other weird things, like starting the asterisk logger manually after doing 'su www-data', OR changing the script to run it as the root user both result in popup notes never being saved, as I described here https://github.com/blak3r/yaai/issues/167#issuecomment-30188939

All of my issues seem to revolve around the asterisk logger not starting automatically

I'm not a sysv ninja by any means, can you help me with this? I'm ready to dive in =)

ViktorNova commented 10 years ago

I have managed to resolve the issue by trial and error, and now it seems to work perfectly! Awesome.

Here's what I did, so others can benefit - this was from a Debian system (Turnkey Linux - SugarCRM 13.0), where I had previously followed the instructions in the wiki to install asterisk_logger as a service, but it didn't start at boot. Asterisk is running on a separate machine (Proxmox VM). I'm not a linux init script wizard by any means, but this seems to work well:

First, I disabled the service from starting on boot

update-rc.d -f  asterisk_logger remove

Then, I deleted this section from /etc/init.d/asterisk_logger

### BEGIN INIT INFO
# chkconfig: 2345 80 30
# Provides:          asterisk_logger
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs $network
# Should-Start:      apache2 asterisk mysql
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts asterisk logger daemon
# Description:       starts asterisk logger using
### END INIT INFO

Then I re-enabled it to start, using the following command (note - this is different than the wiki instructions)

update-rc.d asterisk_logger defaults

You can expect to see the warning

insserv: warning: script 'asterisk_logger' missing LSB tags and overrides

It is fine, and does not seem to affect anything.

After this, did a reboot of the Sugar machine and everything works great!

I think the suggested init script and install commands need to be a little more generic (the init script also seems to depend on asterisk running on the same machine, which is not an ideal scenerio and generally not the case in production)

Should I put a cleaned up version of this in the wiki?

blak3r commented 10 years ago

Post a complete version to this issue and if you want you could add it to the repo and do a pull request. But if your not familiar with that process might not be worth the effort.

Sent via mobile

On Feb 28, 2014, at 9:04 PM, Viktor Nova notifications@github.com wrote:

I have managed to resolve the issue by trial and error, and now it seems to work perfectly! Awesome.

Here's what I did, so others can benefit - this was from a Debian system (Turnkey Linux - SugarCRM 13.0), where I had previously followed the instructions in the wiki to install asterisk_logger as a service, but it didn't start at boot. Asterisk is running on a separate machine (Proxmox VM). I'm not a linux init script wizard by any means, but this seems to work well:

First, I disabled the service from starting on boot

update-rc.d -f asterisk_logger remove Then, I deleted this section from /etc/init.d/asterisk_logger

BEGIN INIT INFO

chkconfig: 2345 80 30

Provides: asterisk_logger

Required-Start: $local_fs $network

Required-Stop: $local_fs $network

Should-Start: apache2 asterisk mysql

Default-Start: 2 3 4 5

Default-Stop: 0 1 6

Short-Description: starts asterisk logger daemon

Description: starts asterisk logger using

END INIT INFO

Then I re-enabled it to start, using the following command (note - this is different than the wiki instructions)

update-rc.d asterisk_logger defaults You can expect to see the warning

insserv: warning: script 'asterisk_logger' missing LSB tags and overrides It is fine, and does not seem to affect anything.

After this, did a reboot of the Sugar machine and everything works great!

I think the suggested init script and install commands need to be a little more generic (the init script also seems to depend on asterisk running on the same machine, which is not an ideal scenerio and generally not the case in production)

Should I put a cleaned up version of this in the wiki?

— Reply to this email directly or view it on GitHub.