Subversion Repositories ALCASAR

Rev

Rev 3238 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3238 Rev 3252
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-CA.sh 3238 2024-12-02 22:38:59Z rexy $
2
# $Id: alcasar-CA.sh 3252 2025-02-21 18:40:30Z rexy $
3
 
3
 
4
# alcasar-CA.sh
4
# alcasar-CA.sh
5
# by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
5
# by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
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 174... Line 174...
174
 
174
 
175
# Limit rights
175
# Limit rights
176
chown -R root:root $SRVKEY $CAKEY
176
chown -R root:root $SRVKEY $CAKEY
177
chmod -R 0600 $SRVKEY $CAKEY
177
chmod -R 0600 $SRVKEY $CAKEY
178
 
178
 
179
# Link certs in ALCASAR Control Center
179
# Link CAcerts in ALCASAR Control Center
180
if [ -s "$CACERT" -a -s "$CAKEY" -a -s "$SRVCERT" -a -s "$SRVKEY" ];
180
if [ -s "$CACERT" -a -s "$CAKEY" -a -s "$SRVCERT" -a -s "$SRVKEY" ];
181
	then
181
	then
182
	[ -d $DIR_WEB/certs ] || mkdir -p $DIR_WEB/certs
182
	[ -d $DIR_WEB/certs ] || mkdir -p $DIR_WEB/certs
183
	rm -f $DIR_WEB/certs/*
183
	rm -f $DIR_WEB/certs/*
184
	ln -s $CACERT $DIR_WEB/certs/certificat_alcasar_ca.crt
184
	ln -s $CACERT $DIR_WEB/certs/certificat_alcasar_ca.crt
185
	ln -s $SRVCERT $DIR_WEB/certs/certificat_alcasar.crt
-
 
186
	rm -rf $DIR_TMP
185
	rm -rf $DIR_TMP
187
	exit 0
186
	exit 0
188
else
187
else
189
	echo "An error occured when generating security certificates (see : $DIR_TMP/openssl-log)" 
188
	echo "An error occured when generating security certificates (see : $DIR_TMP/openssl-log)" 
190
	exit 1
189
	exit 1