Fix for admin logging in AST_settings_container_SQL.pl
Added --khomp-enable CLI flag to install.pl git-svn-id: svn://192.168.202.10@3671 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -10,10 +10,11 @@
|
|||||||
# !!!!! IMPORTANT !!!!!
|
# !!!!! IMPORTANT !!!!!
|
||||||
# THE SQL STATEMENTS MUST NOT CONTAIN NEWLINES OR CARRIAGE RETURNS!
|
# THE SQL STATEMENTS MUST NOT CONTAIN NEWLINES OR CARRIAGE RETURNS!
|
||||||
#
|
#
|
||||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
# CHANGES
|
# CHANGES
|
||||||
# 160118-1638 - First build
|
# 160118-1638 - First build
|
||||||
|
# 230117-2210 - Fix for admin log issue
|
||||||
#
|
#
|
||||||
|
|
||||||
### begin parsing run-time options ###
|
### begin parsing run-time options ###
|
||||||
@@ -172,7 +173,9 @@ if (length($container_sql)>5)
|
|||||||
if (!$T) { $affected_rows = $dbhA->do($stmtA);}
|
if (!$T) { $affected_rows = $dbhA->do($stmtA);}
|
||||||
if (!$Q) {print " - line $i executed, affected: $affected_rows rows\n";}
|
if (!$Q) {print " - line $i executed, affected: $affected_rows rows\n";}
|
||||||
|
|
||||||
$stmtB="INSERT INTO vicidial_admin_log set event_date=NOW(), user='VDAD', ip_address='1.1.1.1', event_section='CONTAINERS', event_type='OTHER', record_id='$container', event_code='CONTAINER SQL RUN', event_sql=\"$container_lines[$i]\", event_notes='line $i executed, $affected_rows rows affected';";
|
$temp_lines = $container_lines[$i];
|
||||||
|
$temp_lines =~ s/"/'/gi;
|
||||||
|
$stmtB="INSERT INTO vicidial_admin_log set event_date=NOW(), user='VDAD', ip_address='1.1.1.1', event_section='CONTAINERS', event_type='OTHER', record_id='$container', event_code='CONTAINER SQL RUN', event_sql=\"$temp_lines\", event_notes='line $i executed, $affected_rows rows affected';";
|
||||||
if (!$T) { $Iaffected_rows = $dbhA->do($stmtB);}
|
if (!$T) { $Iaffected_rows = $dbhA->do($stmtB);}
|
||||||
if ($DBX) {print " - admin log insert debug: |$Iaffected_rows|$stmtB|\n";}
|
if ($DBX) {print " - admin log insert debug: |$Iaffected_rows|$stmtB|\n";}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# install.pl version 2.14
|
# install.pl version 2.14
|
||||||
#
|
#
|
||||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
|
|
||||||
# CHANGES
|
# CHANGES
|
||||||
@@ -49,6 +49,7 @@
|
|||||||
# 220827-2239 - Added VERM web directory
|
# 220827-2239 - Added VERM web directory
|
||||||
# 220829-1434 - Added 'C' keepalive option
|
# 220829-1434 - Added 'C' keepalive option
|
||||||
# 221228-2049 - Added KhompEnabled option
|
# 221228-2049 - Added KhompEnabled option
|
||||||
|
# 230117-2220 - Added --khomp-enable CLI flag
|
||||||
#
|
#
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
@@ -239,6 +240,7 @@ if (length($ARGV[0])>1)
|
|||||||
print " [--fastagi_log_checkforwait=60] = define FastAGI log check-for-wait seconds\n";
|
print " [--fastagi_log_checkforwait=60] = define FastAGI log check-for-wait seconds\n";
|
||||||
print " [--build_multiserver_conf] = generates conf file examples for extensions.conf and iax.conf\n";
|
print " [--build_multiserver_conf] = generates conf file examples for extensions.conf and iax.conf\n";
|
||||||
print " [--build_phones_conf] = generates conf file examples for extensions.conf, sip.conf and iax.conf\n";
|
print " [--build_phones_conf] = generates conf file examples for extensions.conf, sip.conf and iax.conf\n";
|
||||||
|
print " [--khomp-enable] = build khomp-activated scripts during install\n";
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
@@ -626,6 +628,13 @@ if (length($ARGV[0])>1)
|
|||||||
$CLIcopy_web_lang='n';
|
$CLIcopy_web_lang='n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($args =~ /--khomp-enable/i) # khomp enable flag
|
||||||
|
{
|
||||||
|
$CLIVARKhompEnabled=1;
|
||||||
|
$VARKhompEnabled=1;
|
||||||
|
print " CLI Khomp enabled: YES ($CLIVARKhompEnabled|$VARKhompEnabled)\n";
|
||||||
|
}
|
||||||
|
|
||||||
if ($args =~ /--fastagi_log_min_servers=/i) # CLI defined fastagi min servers
|
if ($args =~ /--fastagi_log_min_servers=/i) # CLI defined fastagi min servers
|
||||||
{
|
{
|
||||||
@CLIDB_minserARY = split(/--fastagi_log_min_servers=/,$args);
|
@CLIDB_minserARY = split(/--fastagi_log_min_servers=/,$args);
|
||||||
|
|||||||
Reference in New Issue
Block a user