mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
ovpnmain.cgi: Load all modules at the beginning
Although Perl modules tend to take a long time to load, it is better to do this at the beginning so that loading the script will show any errors. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -23,6 +23,9 @@
|
|||||||
###
|
###
|
||||||
use CGI;
|
use CGI;
|
||||||
use CGI qw/:standard/;
|
use CGI qw/:standard/;
|
||||||
|
use Imager::QRCode;
|
||||||
|
use MIME::Base32;
|
||||||
|
use MIME::Base64;
|
||||||
use Net::DNS;
|
use Net::DNS;
|
||||||
use Net::Ping;
|
use Net::Ping;
|
||||||
use Net::Telnet;
|
use Net::Telnet;
|
||||||
@@ -2638,9 +2641,6 @@ else
|
|||||||
} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'show otp qrcode'}) {
|
} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'show otp qrcode'}) {
|
||||||
&General::readhasharray("${General::swroot}/ovpn/ovpnconfig", \%confighash);
|
&General::readhasharray("${General::swroot}/ovpn/ovpnconfig", \%confighash);
|
||||||
|
|
||||||
use MIME::Base32;
|
|
||||||
use MIME::Base64;
|
|
||||||
use Imager::QRCode;
|
|
||||||
my $qrcode = Imager::QRCode->new(
|
my $qrcode = Imager::QRCode->new(
|
||||||
size => 6,
|
size => 6,
|
||||||
margin => 0,
|
margin => 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user