Subversion Repositories ALCASAR

Rev

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

Rev 3162 Rev 3163
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#
2
#
3
# $Id: alcasar-letsencrypt.sh 3162 2023-12-14 23:19:39Z rexy $
3
# $Id: alcasar-letsencrypt.sh 3163 2023-12-19 18:17:16Z rexy $
4
#
4
#
5
# alcasar-letsencrypt.sh
5
# alcasar-letsencrypt.sh
6
# by Tom HOUDAYER
6
# by Tom HOUDAYER
7
#
7
#
8
# This script is distributed under the Gnu General Public License (GPL)
8
# This script is distributed under the Gnu General Public License (GPL)
Line 186... Line 186...
186
################################################################################
186
################################################################################
187
#                             INSTALL CERTIFICATE                              #
187
#                             INSTALL CERTIFICATE                              #
188
################################################################################
188
################################################################################
189
install_cert() {
189
install_cert() {
190
	echo "Importing certificate to ALCASAR..."
190
	echo "Importing certificate to ALCASAR..."
191
 
-
 
-
 
191
	LE_cert_folder="$( echo "$ACMESH_HOME/certs/$DOMAIN"*"")"
192
	if [ ! -f $ACMESH_HOME/certs/"$DOMAIN"/"$DOMAIN".cer ]; then
192
	if [ ! -f $LE_cert_folder"/"$DOMAIN.cer ]; then
193
		echo "Certificate not found."
193
		echo "Certificate not found."
194
		return 1
194
		return 1
195
	fi
195
	fi
196
 
196
 
197
	/usr/local/bin/alcasar-importcert.sh \
197
	/usr/local/bin/alcasar-importcert.sh \
198
		-i $ACMESH_HOME/certs/"$DOMAIN"_ecc/"$DOMAIN".cer \
198
		-i $LE_cert_folder"/"$DOMAIN.cer \
199
		-k $ACMESH_HOME/certs/"$DOMAIN"_ecc/"$DOMAIN".key \
199
		-k $LE_cert_folder"/"$DOMAIN.key \
200
		-c $ACMESH_HOME/certs/"$DOMAIN"_ecc/fullchain.cer \
200
		-c $LE_cert_folder/fullchain.cer \
201
		> /dev/null 2>&1
201
		> /dev/null 2>&1
202
 
202
 
203
	if [ $? -ne 0 ]; then
203
	if [ $? -ne 0 ]; then
204
		echo "Error."
204
		echo "Error."
205
		return 1
205
		return 1