Subversion Repositories ALCASAR

Rev

Rev 1830 | Rev 2454 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1830 Rev 2293
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-CA.sh 1830 2016-04-20 07:22:43Z raphael.pion $
2
# $Id: alcasar-CA.sh 2293 2017-06-20 15:31:12Z tom.houdayer $
3
 
3
 
4
# alcasar-CA.sh
4
# alcasar-CA.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
#
7
#
Line 220... Line 220...
220
cp -f $SRVCERT $SRVCHAIN  # in order to simplify the official intranet certificate import process
220
cp -f $SRVCERT $SRVCHAIN  # in order to simplify the official intranet certificate import process
221
chmod a+r $CACERT $SRVCERT $SRVCHAIN
221
chmod a+r $CACERT $SRVCERT $SRVCHAIN
222
 
222
 
223
# Link certs in ALCASAR Control Center
223
# Link certs in ALCASAR Control Center
224
if [ -s "$CACERT" -a -s "$CAKEY" -a -s "$SRVCERT" -a -s "$SRVKEY" ];
224
if [ -s "$CACERT" -a -s "$CAKEY" -a -s "$SRVCERT" -a -s "$SRVKEY" ];
225
 then
225
	then
226
 [ -d $DIR_WEB/certs ] || mkdir -p $DIR_WEB/certs
226
	[ -d $DIR_WEB/certs ] || mkdir -p $DIR_WEB/certs
227
 rm -f $DIR_WEB/certs/*
227
	rm -f $DIR_WEB/certs/*
228
 ln -s $CACERT $DIR_WEB/certs/certificat_alcasar_ca.der
228
	ln -s $CACERT $DIR_WEB/certs/certificat_alcasar_ca.crt
229
 ln -s $SRVCERT $DIR_WEB/certs/certificat_alcasar.crt
229
	ln -s $SRVCERT $DIR_WEB/certs/certificat_alcasar.crt
230
 rm -rf $DIR_TMP
230
	rm -rf $DIR_TMP
231
 exit 0
231
	exit 0
232
else
232
else
233
 echo "Problème lors de la création des certificats (cf. $DIR_TMP/openssl-log)" >> $FIC_PARAM
233
	echo "Problème lors de la création des certificats (cf. $DIR_TMP/openssl-log)" >> $FIC_PARAM
234
 exit 1
234
	exit 1
235
fi
235
fi