Changed keepalive multi-listen-process kill section to only run if listen process is supposed to run on this server

git-svn-id: svn://192.168.202.10@3993 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2026-05-15 20:12:55 +00:00
parent 2f0e65d493
commit 04d7dacce8
+16 -1
View File
@@ -181,9 +181,10 @@
# 260126-1334 - Added check of reserved_extensions against dialplan numbers when building conf files # 260126-1334 - Added check of reserved_extensions against dialplan numbers when building conf files
# 260327-0846 - Added check of empty phone dialplan extensions when building conf files # 260327-0846 - Added check of empty phone dialplan extensions when building conf files
# 260402-1440 - Added reset of vicidial_max_inbound_cache table entries # 260402-1440 - Added reset of vicidial_max_inbound_cache table entries
# 260515-1610 - Changed multi-listen-process kill section to only run if listen process is supposed to run on this server
# #
$build = '260402-1440'; $build = '260515-1610';
$DB=0; # Debug flag $DB=0; # Debug flag
$teodDB=0; # flag to log Timeclock End of Day processes to log file $teodDB=0; # flag to log Timeclock End of Day processes to log file
@@ -808,6 +809,8 @@ else
@psline=@MT; @psline=@MT;
@psoutput=@MT; @psoutput=@MT;
@listen_pid=@MT; @listen_pid=@MT;
if ($AST_send_listen > 0)
{
if ($runningAST_listen > 1) if ($runningAST_listen > 1)
{ {
$runningAST_listen=0; $runningAST_listen=0;
@@ -844,8 +847,20 @@ else
{ {
if ($DB) {print "Killing AST_manager_listen... |$listen_pid[1]|\n";} if ($DB) {print "Killing AST_manager_listen... |$listen_pid[1]|\n";}
`/bin/kill -s 9 $listen_pid[1]`; `/bin/kill -s 9 $listen_pid[1]`;
if (!$killLOGfile) {$killLOGfile = "$PATHlogs/listen_kill.$year-$mon-$mday";}
### open the log file for writing ###
open(Kout, ">>$killLOGfile")
|| die "Can't open $killLOGfile: $!\n";
print Kout "$now_date|Killing AST_manager_listen... |$listen_pid[1]||\n";
close(Kout);
} }
} }
}
else
{
if ($DB) {print "DEBUG: AST_manager_listen is not set to run on this server, so don't check if it's running\n";}
}