Failure to unload zaptel drivers when shutting down?

dswartz

Guru
Joined
Feb 17, 2009
Messages
1,056
Reaction score
0
I've found similar threads involving kernel panics, but that is not happening for me. What I *do* see is shutting down the zaptel service (either explicitly with 'service zaptel stop' or implicitly with 'shutdown -r now'), it complains that it is unable to unload zaptel and the rhino driver because they are in use. Stopping asterisk first avoids this. Threads I saw referred to renaming rc0.d/K92zaptel to rc0.d/K92zaptel so it will run after rc0.d/K94asterisk (this is from trixbox, btw.) Unfortunately, PIAF does not have a K94asterisk, so nothing (apparently) shuts down asterisk before the shutdown attempt on zaptel. I guess I can create a script K01asterisk and put a link to it in rc0.d and have it do 'amportal kill' or whatever - just wondering why that isn't already there?
 
Hi

In FreePBX it is Amportal that starts and stops asterisk, in a vanilla install, asterisk is run as a service.

So you would need to do amportal kill first then shutdown.

Maybe the easiest way is to do a little custom shutdown script, rather than typing reboot.

e.g. /usr/local/sbin/bouncebox.sh

Code:
#!/bin/sh
#This code shuts down asterisk and then reboots the system.
amportal kill
reboot

ALthough not relavant to your problem - adding the following line to /etc/sysctl.conf will reboot the box 20 seconds after a kernel panic

kernel.panic = 20
 
That's a thought, thanks. I'd like to have this associated with zaptel shutdown though - another case is where I want to install updated zaptel drivers and do 'service zaptel stop' and it fails. Yes, I know that 'amportal stop' fixes that, but it would be nice to have it all work automatically :) I guess that would be a change to the zaptel script in the stop case, but then if you're doing restart, it won't restart amportal :( I guess I'm making this too complicated...
 

Members online

Forum statistics

Threads
26,688
Messages
174,412
Members
20,259
Latest member
Fadeek86
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top