create slapd-supann (launcher)
This commit is contained in:
parent
7b4b04f81e
commit
79bb646819
8
Makefile
8
Makefile
|
@ -13,6 +13,14 @@ all:
|
|||
install:
|
||||
install -o root -g root -m 0755 slapd-supann $(BINDIR)
|
||||
install -o root -g root -m 0644 slapd-supann.1 $(MANDIR)/man1
|
||||
install -o root -g root -m 0755 -d $(LIBDIR)
|
||||
install -o root -g root -m 0755 commands/* $(LIBDIR)
|
||||
chmod 0644 $(LIBDIR)/*.help
|
||||
|
||||
uninstall:
|
||||
rm $(BINDIR)/slapd-supann
|
||||
rm $(MANDIR)/man1/slapd-supann.1
|
||||
rm -rf $(LIBDIR)
|
||||
|
||||
# eobuilder targets -- see http://repos.entrouvert.org/eobuilder.git/tree/README.rst
|
||||
dist-bzip2:
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "not implemented"
|
|
@ -0,0 +1 @@
|
|||
erase all ldap data !!WARNING!!
|
44
slapd-supann
44
slapd-supann
|
@ -1,3 +1,45 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "not implemented"
|
||||
ME=`basename $0`
|
||||
COMMANDDIR=`dirname $0`/commands
|
||||
test -d ${COMMANDDIR} || COMMANDDIR=/usr/lib/`basename $0`
|
||||
|
||||
help() {
|
||||
msg="$1"
|
||||
test -n "$msg" && echo $msg
|
||||
echo "syntax: $ME command ..."
|
||||
echo ""
|
||||
echo "available commands:"
|
||||
for fcom in $COMMANDDIR/*.help
|
||||
do
|
||||
com=`basename $fcom .help`
|
||||
descr=`tail -1 $fcom`
|
||||
echo " "$com" "$descr
|
||||
done
|
||||
test -n "$msg" && exit 1
|
||||
exit 0
|
||||
}
|
||||
|
||||
helpcmd() {
|
||||
command=$1
|
||||
xcommand=$COMMANDDIR/$command
|
||||
test -x $xcommand || help "ERR: unknown command ($command)"
|
||||
echo "$ME $command"
|
||||
cat $xcommand.help
|
||||
}
|
||||
|
||||
command=$1
|
||||
test -z $command && help "ERR: missing command"
|
||||
shift
|
||||
|
||||
case $command in
|
||||
help)
|
||||
test -z "$1" && help
|
||||
helpcmd $1
|
||||
;;
|
||||
*)
|
||||
xcommand=$COMMANDDIR/$command
|
||||
test -x $xcommand || help "ERR: unknown command ($command)"
|
||||
$xcommand
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -21,27 +21,15 @@
|
|||
slapd-supann \- manage OpenLDAP server (slapd) with SupAnn flavor
|
||||
.SH SYNOPSIS
|
||||
.B slapd-supann
|
||||
.RI [ options ] " command " ...
|
||||
.RI <command>
|
||||
.br
|
||||
.BR slapd-supann
|
||||
.BR help
|
||||
.RI [command]
|
||||
.SH DESCRIPTION
|
||||
This manual page documents briefly the
|
||||
.B slapd-supann
|
||||
commands.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
|
||||
.\" respectively.
|
||||
\fBslapd-supann\fP is a program that...
|
||||
.SH OPTIONS
|
||||
These programs follow the usual GNU command line syntax, with long
|
||||
options starting with two dashes (`-').
|
||||
A summary of options is included below.
|
||||
For a complete description, see the Info files.
|
||||
.TP
|
||||
.B \-h, \-\-help
|
||||
Show summary of options.
|
||||
.TP
|
||||
.B \-v, \-\-version
|
||||
Show version of program.
|
||||
offers a set of commands to manage a slapd (OpenLDAP server),
|
||||
according to SupAnn standard.
|
||||
.SH SEE ALSO
|
||||
.BR slapd (8),
|
||||
.BR ldapsearch (1),
|
||||
|
|
Reference in New Issue