GenerateNewPubPrivKeys.sh
729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
usage="
\n ### Generate new public / private keys for DDService###
\n
\n Usage : $0 -d <Client description>
\n
\n $0 -d \"AMDA Dev instance\"
\n
\n
\n ###"
while getopts "d:h" options; do
case $options in
d ) CLIENT_DESCRIPTION=`echo $OPTARG`;;
h ) echo -e $usage
exit 1;;
\? ) echo -e $usage
exit 1;;
* ) echo -e $usage
exit 1;;
esac
done
if [ "$CLIENT_DESCRIPTION" = "" ]
then
echo "[ERROR] Missing client description"
echo -e $usage
exit 1
fi
BASEDIR=$(dirname "$0")
. ${BASEDIR}/DDServer.env
php ${USERMANAGER}/GenerateNewPubPrivKeys.php --description "$CLIENT_DESCRIPTION"