[packages/onelogin-ldap_connector] add sysconfig file
glen
glen at pld-linux.org
Thu Sep 24 16:04:00 CEST 2015
commit ef9de07ece078e60d138329fdb98b644c891f93b
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Thu Sep 24 16:59:02 2015 +0300
add sysconfig file
ol-ldapc.init | 9 +++++----
ol-ldapc.sysconfig | 7 +++++++
onelogin-ldap_connector.spec | 7 +++++--
3 files changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/onelogin-ldap_connector.spec b/onelogin-ldap_connector.spec
index fab6802..db83a4a 100644
--- a/onelogin-ldap_connector.spec
+++ b/onelogin-ldap_connector.spec
@@ -4,7 +4,7 @@
Summary: Onelogin Directory Integration
Name: onelogin-ldap_connector
Version: 1.25
-Release: 0.2
+Release: 0.3
License: ?
Group: Libraries
# Forever free account can be obtained from https://www.onelogin.com/signup
@@ -12,6 +12,7 @@ Source0: https://s3.amazonaws.com/onelogin-downloads/ldapc/1_25/ldap_connector.z
# NoSource0-md5: 32d0949fba09e8377535768f8b570575
NoSource: 0
Source1: ol-ldapc.init
+Source2: ol-ldapc.sysconfig
URL: https://www.onelogin.com/product/directory
Requires: jre
BuildArch: noarch
@@ -32,10 +33,11 @@ domains via a single connector.
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_appdir},/var/log/ol-ldapc,/etc/rc.d/init.d}
+install -d $RPM_BUILD_ROOT{%{_appdir},/var/log/ol-ldapc,/etc/{rc.d/init.d,sysconfig}}
cp -a ldap-connector.jar lib resources $RPM_BUILD_ROOT%{_appdir}
ln -s /var/log/ol-ldapc $RPM_BUILD_ROOT%{_appdir}/log
install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ol-ldapc
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ol-ldapc
%clean
rm -rf $RPM_BUILD_ROOT
@@ -44,6 +46,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc README
%attr(754,root,root) /etc/rc.d/init.d/ol-ldapc
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ol-ldapc
%dir %{_appdir}
%{_appdir}/ldap-connector.jar
%dir %{_appdir}/lib
diff --git a/ol-ldapc.init b/ol-ldapc.init
index 71b221d..fe461ba 100755
--- a/ol-ldapc.init
+++ b/ol-ldapc.init
@@ -24,6 +24,9 @@ else
exit 0
fi
+BASEDN="dc=example,dc=org"
+TOKEN=
+
# Get service config - may override defaults
[ -f /etc/sysconfig/ol-ldapc ] && . /etc/sysconfig/ol-ldapc
@@ -37,10 +40,8 @@ start() {
fi
msg_starting "OneLogin LDAP Connector"
- BASEDN="dc=delfi,dc=net"
- TOKEN=1
- java -XX:-UseGCOverheadLimit -Xmx64M -Xms64M -jar /usr/share/onelogin-ldap_connector/ldap-connector.jar \
- --token $TOKEN --sync-interval 30 --object-classes "posixAccount" --base-dn $BASEDN
+ java -XX:-UseGCOverheadLimit -Xmx64M -Xms64M -jar /usr/lib/onelogin-ldap_connector/ldap-connector.jar \
+ --token "$TOKEN" --sync-interval 30 --object-classes "posixAccount" --base-dn "$BASEDN"
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ol-ldapc
diff --git a/ol-ldapc.sysconfig b/ol-ldapc.sysconfig
new file mode 100644
index 0000000..4be96a2
--- /dev/null
+++ b/ol-ldapc.sysconfig
@@ -0,0 +1,7 @@
+# Config for OneLogin LDAP Connector
+
+# LDAP base DN
+BASEDN="dc=example,dc=org"
+
+# Auth token
+TOKEN=
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/onelogin-ldap_connector.git/commitdiff/db3566376362a76cf62c93652f02a8c06e1c4104
More information about the pld-cvs-commit
mailing list