Subversion Repositories ALCASAR

Rev

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

Rev 2850 Rev 3300
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#
2
#
3
# $Id: alcasar-importcert.sh 2850 2020-07-15 22:24:44Z rexy $
3
# $Id: alcasar-importcert.sh 3300 2025-09-23 16:11:12Z rexy $
4
#
4
#
5
# alcasar-importcert.sh
5
# alcasar-importcert.sh
6
# by Raphaël, Hugo, Clément, Bettyna & rexy
6
# by Raphaël, Hugo, Clément, Bettyna & rexy
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 162... Line 162...
162
		if [ -f "/etc/pki/tls/certs/alcasar.crt.old" -a -f "/etc/pki/tls/private/alcasar.key.old" ]
162
		if [ -f "/etc/pki/tls/certs/alcasar.crt.old" -a -f "/etc/pki/tls/private/alcasar.key.old" ]
163
		then
163
		then
164
			echo "Restoring default certificate"
164
			echo "Restoring default certificate"
165
			defaultCert
165
			defaultCert
166
			domainName
166
			domainName
-
 
167
			# Reset Letsencrypt file
-
 
168
			cat <<EOF > /usr/local/etc/alcasar-letsencrypt
-
 
169
email=
-
 
170
dateIssueRequest=
-
 
171
domainRequest=
-
 
172
challenge=
-
 
173
dateIssued=
-
 
174
dnsapi=
-
 
175
dateNextRenewal=
-
 
176
EOF
167
		else echo "No default cert found"
177
		else echo "No default cert found"
168
		fi
178
		fi
169
		;;
179
		;;
170
	*)
180
	*)
171
		echo -e "$usage"
181
		echo -e "$usage"