Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
cd3cdb54
Commit
cd3cdb54
authored
Dec 27, 2015
by
neil
Browse files
fix centos and openssl
parent
bf586981
Changes
1
Hide whitespace changes
Inline
Side-by-side
le.sh
View file @
cd3cdb54
...
...
@@ -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]
\n
subjectAltName=
$alt
"
)
)
-out
$CSR_PATH
openssl req
-new
-sha256
-key
$CERT_KEY_PATH
-subj
"/CN=
$domain
"
-reqexts
SAN
-config
<
(
printf
"[ req_distinguished_name ]
\n
[ req ]
\n
distinguished_name = req_distinguished_name
\n
[SAN]
\n
subjectAltName=
$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,7 +548,11 @@ install() {
_info
"Installing cron job"
if
!
crontab
-l
|
grep
'le.sh renewAll'
;
then
crontab
-l
|
{
cat
;
echo
"0 0 * * * le.sh renewAll"
;
}
| crontab -
service cron restart
if
command
-v
crond
;
then
service cron reload
else
service cron restart
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment