mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-11-09 16:01:46 +00:00
fix centos and openssl
This commit is contained in:
parent
bf586981db
commit
cd3cdb5453
30
le.sh
30
le.sh
@ -122,7 +122,7 @@ createCSR() {
|
||||
alt=DNS:$(echo $domainlist | sed "s/,/,DNS:/g")
|
||||
#multi
|
||||
echo multi domain $alt
|
||||
openssl req -new -sha256 -key $CERT_KEY_PATH -subj "/CN=$domain" -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=$alt")) -out $CSR_PATH
|
||||
openssl req -new -sha256 -key $CERT_KEY_PATH -subj "/CN=$domain" -reqexts SAN -config <(printf "[ req_distinguished_name ]\n[ req ]\ndistinguished_name = req_distinguished_name\n[SAN]\nsubjectAltName=$alt") -out $CSR_PATH
|
||||
fi
|
||||
|
||||
}
|
||||
@ -509,9 +509,31 @@ install() {
|
||||
_initpath
|
||||
if ! command -v "curl" ; then
|
||||
_info "Please install curl first."
|
||||
_info "sudo apt-get install curl"
|
||||
_info "Ubuntu: sudo apt-get install curl"
|
||||
_info "CentOS: yum install curl"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! command -v "crontab" ; then
|
||||
_info "Please install crontab first."
|
||||
_info "CentOs: yum -y install crontabs"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! command -v "openssl" ; then
|
||||
_info "Please install openssl first."
|
||||
_info "CentOs: yum -y install openssl"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! command -v "xxd" ; then
|
||||
_info "Please install xxd first."
|
||||
_info "CentOs: yum install vim-common"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
_info "Installing to $WORKING_DIR"
|
||||
|
||||
mkdir -p $WORKING_DIR/
|
||||
@ -526,8 +548,12 @@ install() {
|
||||
_info "Installing cron job"
|
||||
if ! crontab -l | grep 'le.sh renewAll' ; then
|
||||
crontab -l | { cat; echo "0 0 * * * le.sh renewAll"; } | crontab -
|
||||
if command -v crond ; then
|
||||
service cron reload
|
||||
else
|
||||
service cron restart
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
_info OK
|
||||
|
Loading…
Reference in New Issue
Block a user