Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Xavier Bachelot
lemonldap-ng
Commits
3b083ee9
Commit
3b083ee9
authored
Feb 11, 2016
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Status for Nginx (#934)
parent
6bd45f2f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
2 deletions
+31
-2
e2e-tests/llng.psgi
e2e-tests/llng.psgi
+8
-1
fastcgi-server/man/llng-fastcgi-server.1p
fastcgi-server/man/llng-fastcgi-server.1p
+1
-1
fastcgi-server/sbin/llng-fastcgi-server
fastcgi-server/sbin/llng-fastcgi-server
+7
-0
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Base.pm
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Base.pm
+15
-0
No files found.
e2e-tests/llng.psgi
View file @
3b083ee9
...
...
@@ -10,6 +10,7 @@ BEGIN {
use lib "$pwd/lemonldap-ng-handler/blib/lib";
use lib "$pwd/lemonldap-ng-portal/blib/lib";
use lib "$pwd/lemonldap-ng-manager/blib/lib";
use Lemonldap::NG::Handler::SharedConf;
}
;
die
$@
if
(
$@
);
}
...
...
@@ -21,6 +22,10 @@ my %builder = (
require
Lemonldap::NG::Handler::
Nginx
;
return
Lemonldap::NG::Handler::
Nginx
->
run
(
{}
);
},
status
=>
sub
{
require
Lemonldap::NG::Handler::
Nginx
;
return
Lemonldap::NG::Handler::
Nginx
->
status
();
},
manager
=>
sub
{
require
Lemonldap::NG::
Manager
;
return
Lemonldap::NG::
Manager
->
run
(
{}
);
...
...
@@ -33,7 +38,7 @@ my %builder = (
return
$_apps
{
$script
}
->
(
@
_
)
if
(
$_apps
{
$script
}
);
$_apps
{
$script
}
=
CGI::Emulate::
PSGI
->
handler
(
CGI::
Compile
->
compile
(
$script
)
);
return
$_app
{
$script
}
->
(
@
_
);
return
$_app
s
{
$script
}
->
(
@
_
);
};
},
test
=>
sub
{
...
...
@@ -44,6 +49,8 @@ my %builder = (
},
);
Lemonldap::NG::Handler::
SharedConf
->
init
();
sub
{
my
$type
=
$_
[
0
]
->
{
LLTYPE
}
||
'
handler
';
return
$_apps
{
$type
}
->
(
@
_
)
if
(
defined
$_apps
{
$type
}
);
...
...
fastcgi-server/man/llng-fastcgi-server.1p
View file @
3b083ee9
...
...
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "llng-fastcgi-server 1"
.TH llng-fastcgi-server 1 "2016-02-
07
" "perl v5.22.1" "User Contributed Perl Documentation"
.TH llng-fastcgi-server 1 "2016-02-
11
" "perl v5.22.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
...
...
fastcgi-server/sbin/llng-fastcgi-server
View file @
3b083ee9
...
...
@@ -5,6 +5,7 @@ use strict;
use
warnings
;
use
POSIX
;
use
Getopt::
Std
;
use
Lemonldap::NG::Handler::
SharedConf
;
our
%opts
;
my
%_apps
;
...
...
@@ -32,6 +33,10 @@ my %builder = (
require
Lemonldap::NG::Handler::
Nginx
;
return
Lemonldap::NG::Handler::
Nginx
->
run
(
{}
);
},
status
=>
sub
{
require
Lemonldap::NG::Handler::
Nginx
;
return
Lemonldap::NG::Handler::
Nginx
->
status
();
},
manager
=>
sub
{
require
Lemonldap::NG::
Manager
;
return
Lemonldap::NG::
Manager
->
run
(
{}
);
...
...
@@ -63,6 +68,8 @@ my $app = sub {
die
"
Unknown PSGI type
$type
";
};
Lemonldap::NG::Handler::
SharedConf
->
init
();
my
$server
=
Plack::
Runner
->
new
();
$server
->
parse_options
(
'
-s
'
=>
'
FCGI
',
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Base.pm
View file @
3b083ee9
...
...
@@ -70,6 +70,21 @@ sub _run {
}
}
sub
status
{
my
$class
=
shift
;
# Check if main handler initialization has been done
unless
(
%$tsv
)
{
eval
{
Lemonldap::NG::Handler::
SharedConf
->
checkConf
()
};
$class
->
lmLog
(
$@
,
'
error
'
)
if
(
$@
);
}
return
sub
{
Lemonldap::NG::Handler::
API
->
newRequest
(
Lemonldap::NG::Common::PSGI::
Request
->
new
(
$_
[
0
]
)
);
$class
->
SUPER::
status
();
};
}
## @method private PSGI-Response _authAndTrace($req)
# Launch Lemonldap::NG::Handler::SharedConf::run() and then handler() if
# response is 200.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment