-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from thresheek/master
Added systemd service file and rpm spec file
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Description=LDAP authentication helper for Nginx | ||
After=network.target network-online.target | ||
|
||
[Service] | ||
Type=simple | ||
User=nobody | ||
Group=nobody | ||
WorkingDirectory=/var/run | ||
PIDFile=/run/nginx-ldap-auth/nginx-ldap-auth.pid | ||
ExecStart=/usr/bin/nginx-ldap-auth-daemon | ||
KillMode=process | ||
KillSignal=SIGINT | ||
Restart=on-failure | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Name: nginx-ldap-auth | ||
Version: 0.0.3 | ||
Release: 1%{?dist} | ||
Summary: NGINX Plus LDAP authentication daemon | ||
|
||
Group: System Environment/Daemons | ||
License: 2-clause BSD-like license | ||
URL: https://github.com/nginxinc/nginx-ldap-auth | ||
Source0: nginx-ldap-auth-release-%{version}.tar.gz | ||
|
||
BuildRequires: systemd | ||
Requires: systemd | ||
Requires: python-ldap | ||
|
||
%description | ||
Reference implementation of method for authenticating users on behalf of | ||
servers proxied by NGINX or NGINX Plus. | ||
|
||
%prep | ||
%setup -q | ||
|
||
%install | ||
mkdir -p %buildroot%_bindir | ||
install -m755 nginx-ldap-auth-daemon.py %buildroot%_bindir/nginx-ldap-auth-daemon | ||
mkdir -p %buildroot%_unitdir | ||
install -m644 nginx-ldap-auth.service %buildroot%_unitdir/ | ||
|
||
%files | ||
%doc README.md nginx-ldap-auth.conf backend-sample-app.py LICENSE | ||
%_bindir/nginx-ldap-auth-daemon | ||
%_unitdir/nginx-ldap-auth.service | ||
|
||
%post | ||
/usr/bin/systemctl preset nginx-ldap-auth.service | ||
|
||
%preun | ||
/usr/bin/systemctl --no-reload disable nginx-ldap-auth.service >/dev/null 2>&1 ||: | ||
/usr/bin/systemctl stop nginx-ldap-auth.service >/dev/null 2>&1 ||: | ||
|
||
%postun | ||
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 ||: | ||
|
||
%changelog | ||
* Wed Nov 02 2016 Konstantin Pavlov <[email protected]> 0.0.3-1 | ||
- Initial release |