From b8b2a943056adbb112474df7bdf766970a56b2dc Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 18 Sep 2018 18:19:03 -0400 Subject: Bug 1455495 - Replace apache with Mojolicious --- scripts/block-ip.pl | 10 ++++++---- scripts/entrypoint.pl | 14 +------------- scripts/undo.pl | 0 3 files changed, 7 insertions(+), 17 deletions(-) mode change 100644 => 100755 scripts/undo.pl (limited to 'scripts') diff --git a/scripts/block-ip.pl b/scripts/block-ip.pl index b767a1fd5..3fa66d336 100755 --- a/scripts/block-ip.pl +++ b/scripts/block-ip.pl @@ -12,8 +12,8 @@ use warnings; use lib qw(. lib local/lib/perl5); use Bugzilla; +use Bugzilla::Quantum; use Bugzilla::Constants; -use Bugzilla::ModPerl::BlockIP; use Getopt::Long; Bugzilla->usage_mode(USAGE_MODE_CMDLINE); @@ -23,10 +23,12 @@ GetOptions('unblock' => \$unblock); pod2usage("No IPs given") unless @ARGV; +my $app = Bugzilla::Quantum->new; + if ($unblock) { - Bugzilla::ModPerl::BlockIP->unblock_ip($_) for @ARGV; + $app->unblock_ip($_) for @ARGV; } else { - Bugzilla::ModPerl::BlockIP->block_ip($_) for @ARGV; + $app->block_ip($_) for @ARGV; } =head1 NAME @@ -52,4 +54,4 @@ If passed, the IPs will be unblocked instead of blocked. Use this to remove IPs =head1 DESCRIPTION -This is just a simple CLI inteface to L. +This is just a simple CLI inteface to L. diff --git a/scripts/entrypoint.pl b/scripts/entrypoint.pl index ce1cc795b..21d9aebb1 100755 --- a/scripts/entrypoint.pl +++ b/scripts/entrypoint.pl @@ -83,7 +83,6 @@ sub cmd_demo { sub cmd_httpd { check_data_dir(); wait_for_db(); - check_httpd_env(); my $httpd_exit_f = run_cereal_and_httpd(); assert_httpd()->get(); @@ -156,6 +155,7 @@ sub cmd_test_webservices { sub cmd_test_selenium { my $conf = require $ENV{BZ_QA_CONF_FILE}; + $ENV{HTTP_BACKEND} = 'simple'; check_data_dir(); copy_qa_extension(); @@ -207,8 +207,6 @@ sub cmd_test_bmo { sub run_prove { my (%param) = @_; - check_httpd_env(); - my $prove_cmd = $param{prove_cmd}; my $prove_dir = $param{prove_dir}; assert_httpd()->then(sub { @@ -268,16 +266,6 @@ sub check_env { die 'Missing required environmental variables: ', join(', ', @missing_env), "\n"; } } -sub check_httpd_env { - check_env(qw( - HTTPD_StartServers - HTTPD_MinSpareServers - HTTPD_MaxSpareServers - HTTPD_ServerLimit - HTTPD_MaxClients - HTTPD_MaxRequestsPerChild - )) -} sub fix_path { $ENV{PATH} = "/app/local/bin:$ENV{PATH}"; diff --git a/scripts/undo.pl b/scripts/undo.pl old mode 100644 new mode 100755 -- cgit v1.2.3-24-g4f1b