Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding Makefile to ease installation

  • Loading branch information...
commit 0e0ee52b6b3274aa839484a6ab62eb7c007f59f7 1 parent b7a5600
Andrew Smillie authored
Showing with 40 additions and 1 deletion.
  1. +34 −0 LDAP/Makefile
  2. +3 −1 LDAP/gsadduser
  3. +3 −0  LDAP/gslistusers
34 LDAP/Makefile
View
@@ -0,0 +1,34 @@
+# Makefile for GeekSoc LDAP utilities
+#
+# Copyright (c) 2011 Andrew Smillie <asmillie@geeksoc.org>
+
+
+DESTDIR =
+PREFIX = /usr/local
+
+# Identity
+SHELL= /bin/sh
+NAME = ldapscripts
+#SUFFIX = -devel
+
+# Default installation paths
+SBINDIR = $(PREFIX)/sbin
+MANDIR = $(PREFIX)/man
+ETCDIR = $(PREFIX)/etc/$(NAME)
+LIBDIR = $(PREFIX)/lib/$(NAME)
+
+install: install-adduser install-listuser
+
+install-adduser:
+ @install -m 750 "gsadduser" "$(DESTDIR)$(SBINDIR)/gsadduser"
+ @install -m 640 "gsuser.template" "$(DESTDIR)$(ETCDIR)/gsuser.template"
+ @install -m 640 "gsruntime" "$(DESTDIR)$(ETCDIR)/gsruntime"
+
+install-listuser:
+ @install -m 755 "gslistusers" "$(DESTDIR)$(SBINDIR)/gslistusers"
+ @install -m 755 "gsparseldif" "$(DESTDIR)$(SBINDIR)/gsparseldif"
+
+uninstall:
+ @rm -rf "$(DESTDIR)$(SBINDIR)/gsadduser" "$(DESTDIR)$(ETCDIR)/gsuser.template" "$(DESTDIR)$(ETCDIR)/gsruntime"
+ @rm -rf "$(DESTDIR)$(SBINDIR)/gslistusers" "$(DESTDIR)$(SBINDIR)/gsparseldif"
+
4 LDAP/gsadduser
View
@@ -111,6 +111,8 @@ fi
echo "Username: $_USER Email: $MAIL" | mail -r support@geeksoc.org -s "[GSN] New Account Created" president@geeksoc.org
echo "Username: $_USER Password: $_PASSWORD" | mail -r support@geeksoc.org -s "[GeekSoc] Your account has been created" $MAIL
+ldapaddusertogroup $_USER members
+
end_ok
# Ldif template ##################################
@@ -124,4 +126,4 @@ end_ok
##homeDirectory: <home>
##loginShell: <shell>
##gecos: <user>
-##description: User account
+##description: User account
3  LDAP/gslistusers
View
@@ -0,0 +1,3 @@
+#! /bin/bash
+
+ldapsearch -xLLL -b ou=people,dc=geeksoc,dc=org | /usr/local/sbin/gsparseldif
Please sign in to comment.
Something went wrong with that request. Please try again.