Subversion Repositories ALCASAR

Rev

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

Rev 2758 Rev 2775
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-CA.sh 2758 2019-11-03 23:17:20Z rexy $
2
# $Id: alcasar-CA.sh 2775 2020-03-08 23:13:41Z rexy $
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 221... Line 221...
221
rm -f $SRVREQ
221
rm -f $SRVREQ
222
 
222
 
223
(cat $SRVKEY; echo; cat $SRVCERT) > $SRVPEM
223
(cat $SRVKEY; echo; cat $SRVCERT) > $SRVPEM
224
cp -f $CACERT $SRVCHAIN
224
cp -f $CACERT $SRVCHAIN
225
 
225
 
-
 
226
# Limit rights
-
 
227
chown -R root:root $SRVKEY $CAKEY
226
chmod a+r $CACERT $SRVCERT $SRVCHAIN
228
chmod -R 0600 $SRVKEY $CAKEY
227
 
229
 
228
# Link certs in ALCASAR Control Center
230
# Link certs in ALCASAR Control Center
229
if [ -s "$CACERT" -a -s "$CAKEY" -a -s "$SRVCERT" -a -s "$SRVKEY" ];
231
if [ -s "$CACERT" -a -s "$CAKEY" -a -s "$SRVCERT" -a -s "$SRVKEY" ];
230
	then
232
	then
231
	[ -d $DIR_WEB/certs ] || mkdir -p $DIR_WEB/certs
233
	[ -d $DIR_WEB/certs ] || mkdir -p $DIR_WEB/certs