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
LemonLDAP NG
lemonldap-ng
Commits
ab1dcbc3
Commit
ab1dcbc3
authored
Feb 15, 2016
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix FastCGI socket and pid path (
#583
)
parent
231c2d07
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
17 deletions
+32
-17
Makefile
Makefile
+22
-4
fastcgi-server/default/llng-fastcgi-server
fastcgi-server/default/llng-fastcgi-server
+2
-5
fastcgi-server/man/llng-fastcgi-server.1p
fastcgi-server/man/llng-fastcgi-server.1p
+1
-1
fastcgi-server/rc/llng-fastcgi-server
fastcgi-server/rc/llng-fastcgi-server
+2
-2
fastcgi-server/sbin/llng-fastcgi-server
fastcgi-server/sbin/llng-fastcgi-server
+3
-3
fastcgi-server/systemd/llng-fastcgi-server.conf
fastcgi-server/systemd/llng-fastcgi-server.conf
+1
-1
fastcgi-server/systemd/llng-fastcgi-server.service
fastcgi-server/systemd/llng-fastcgi-server.service
+1
-1
No files found.
Makefile
View file @
ab1dcbc3
...
...
@@ -110,6 +110,10 @@ RCAPTCHADIR=$(DESTDIR)/$(CAPTCHADIR)
# Apache user/group
APACHEUSER
=
APACHEGROUP
=
# FastCGI
FASTCGISOCKDIR
=
$(PREFIX)
/run
RFASTCGISOCKDIR
=
$(DESTDIR)
/
$(FASTCGISOCKDIR)
FASTCGIUSER
=
$(APACHEUSER)
FASTCGIGROUP
=
$(APACHEGROUP)
...
...
@@ -447,12 +451,14 @@ install_bin: install_conf_dir
@
chmod
+x
$(RBINDIR)
/
*
install_fastcgi_server
:
@
install
-v
-d
$(RSBINDIR)
$(RINITDIR)
$(RETCDEFAULTDIR)
@
install
-v
-d
$(RSBINDIR)
$(RINITDIR)
$(RETCDEFAULTDIR)
$(RFASTCGISOCKDIR)
@
cp
-f
fastcgi-server/sbin/llng-fastcgi-server
$(RSBINDIR)
@
cp
-f
fastcgi-server/rc/llng-fastcgi-server
$(RINITDIR)
@
cp
-f
fastcgi-server/default/llng-fastcgi-server
$(RETCDEFAULTDIR)
$(PERL)
-pi
-e
's#__SBINDIR__#
$(SBINDIR)
#;s#__DEFAULTDIR__#
$(ETCDEFAULTDIR)
#'
\
$(RETCDEFAULTDIR)
/llng-fastcgi-server
@
$(PERL)
-pi
-e
's#__SBINDIR__#
$(SBINDIR)
#;s#__DEFAULTDIR__#
$(ETCDEFAULTDIR)
#;s#__FASTCGISOCKDIR__#
$(FASTCGISOCKDIR)
#g'
\
$(RETCDEFAULTDIR)
/llng-fastcgi-server
\
$(RSBINDIR)
/llng-fastcgi-server
\
$(RSBINDIR)
/llng-fastcgi-server
@
if
[
!
"
$(FASTCGIUSER)
"
]
;
then
\
$(PERL)
-pi
-e
's#__USER__#nobody#'
$(RETCDEFAULTDIR)
/llng-fastcgi-server
;
\
else
\
...
...
@@ -463,6 +469,15 @@ install_fastcgi_server:
else
\
$(PERL)
-pi
-e
's#__USER__#
$(FASTCGIGROUP)
#'
$(RETCDEFAULTDIR)
/llng-fastcgi-server
;
\
fi
if
[
"
$(FASTCGIUSER)
"
!=
""
]
;
then
\
chown
$(FASTCGIUSER)
$(RFASTCGISOCKDIR)
||
exit
1
;
\
if
[
"
$(FASTCGIGROUP)
"
!=
""
]
;
then
\
chgrp
$(FASTCGIGROUP)
$(RFASTCGISOCKDIR)
||
exit
1
;
\
fi
;
\
chmod
770
$(RFASTCGISOCKDIR)
;
\
else
\
chmod
777
$(RFASTCGISOCKDIR)
;
\
fi
#
# SITE INSTALL
...
...
@@ -619,9 +634,12 @@ install_test_site:
install_examples_site
:
# Examples install
@
install
-v
-d
$(REXAMPLESDIR)
@
for
i
in
manager
portal handler
;
do
\
@
for
i
in
portal handler
;
do
\
cp
-a
-f
lemonldap-ng-
$$
i/example
$(REXAMPLESDIR)
/
$$
i
;
\
done
@
for
i
in
manager
;
do
\
cp
-a
-f
lemonldap-ng-
$$
i/eg
$(REXAMPLESDIR)
/
$$
i
;
\
done
@
rm
-rf
$(REXAMPLESDIR)
/portal/skins
\
$(REXAMPLESDIR)
/manager/skins
\
@rm
-rf
$$
(
find
$(REXAMPLESDIR)
-type
d
-name
.svn
)
...
...
fastcgi-server/default/llng-fastcgi-server
View file @
ab1dcbc3
# Number of process (default: 7)
#NPROC = 7
# Portal CGI path
#PORTAL_PATH = /var/lib/lemonldap-ng/portal
# Unix socket to listen to
#SOCKET =
/run
/llng-fastcgi.sock
#SOCKET =
__FASTCGISOCKDIR__
/llng-fastcgi.sock
# Pid file
#PID =
/run
/llng-fastcgi.pid
#PID =
__FASTCGISOCKDIR__
/llng-fastcgi
-server
.pid
# User and GROUP
USER = __USER__
...
...
fastcgi-server/man/llng-fastcgi-server.1p
View file @
ab1dcbc3
...
...
@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "llng-fastcgi-server 1"
.TH llng-fastcgi-server 1 "2016-02-1
1
" "perl v5.22.1" "User Contributed Perl Documentation"
.TH llng-fastcgi-server 1 "2016-02-1
5
" "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/rc/llng-fastcgi-server
View file @
ab1dcbc3
...
...
@@ -29,10 +29,10 @@ test -x $DAEMON || exit 0
# Try to extract llng-fastcgi-server pidfile
if
[
-z
"
$PID
"
]
;
then
PID
=
/run
/llng-fastcgi-server.pid
PID
=
__FASTCGISOCKDIR__
/llng-fastcgi-server.pid
fi
if
[
-z
"
$SOCKET
"
]
;
then
SOCKET
=
/var/run/llng-fastcgi-server
/llng-fastcgi.sock
SOCKET
=
__FASTCGISOCKDIR__
/llng-fastcgi.sock
fi
DAEMON_OPTS
=
"-p
${
PID
}
-u
${
USER
}
-g
${
GROUP
}
-s
${
SOCKET
}
"
...
...
fastcgi-server/sbin/llng-fastcgi-server
View file @
ab1dcbc3
...
...
@@ -13,8 +13,8 @@ my %_apps;
getopts
(
'
n:p:s:u:g:
',
\
%opts
);
$opts
{
n
}
||=
$ENV
{
NPROC
}
||
7
;
$opts
{
p
}
||=
$ENV
{
PID
}
||
'
/run
/llng-fastcgi.pid
';
$opts
{
s} ||= $ENV{SOCKET}
|| '/run
/llng-fastcgi.sock';
$opts
{
p
}
||=
$ENV
{
PID
}
||
'
__FASTCGISOCKDIR__
/llng-fastcgi.pid
';
$opts
{
s} ||= $ENV{SOCKET}
|| '__FASTCGISOCKDIR__
/llng-fastcgi.sock';
$opts{u}
||=
$ENV
{
USER
};
$opts
{
g
}
||=
$ENV
{
GROUP
};
...
...
fastcgi-server/systemd/llng-fastcgi-server.conf
View file @
ab1dcbc3
...
...
@@ -10,5 +10,5 @@ pre-start script
[ -
x
/
usr
/
sbin
/
llng
-
fastcgi
-
server
] || {
stop
;
exit
0
; }
end
script
exec
/
usr
/
sbin
/
llng
-
fastcgi
-
server
-
u
www
-
data
-
g
www
-
data
-
s
/
var
/
run
/
llng
-
fastcgi
-
server
/
llng
-
fastcgi
.
sock
-
p
/
var
/
run
/
llng
-
fastcgi
-
server
/
llng
-
fastcgi
-
server
.
pid
exec
/
usr
/
sbin
/
llng
-
fastcgi
-
server
-
u
www
-
data
-
g
www
-
data
-
s
__
FASTCGISOCKDIR__
/
llng
-
fastcgi
.
sock
-
p
__
FASTCGISOCKDIR__
/
llng
-
fastcgi
-
server
.
pid
fastcgi-server/systemd/llng-fastcgi-server.service
View file @
ab1dcbc3
...
...
@@ -5,7 +5,7 @@ After=network.target
[Service]
Type
=
forking
EnvironmentFile
=
/etc/default/llng-fastcgi-server
PIDFile
=
/var/run/llng-fastcgi-server
/llng-fastcgi-server.pid
PIDFile
=
__FASTCGISOCKDIR__
/llng-fastcgi-server.pid
ExecStart
=
/usr/sbin/llng-fastcgi-server
ExecStop
=
-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile ${PID}
KillMode
=
mixed
...
...
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