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
ebf478f8
Commit
ebf478f8
authored
Dec 29, 2015
by
Neil
Browse files
Merge pull request #12 from Neilpang/dev
fix renewAll
parents
5a177aad
ebb43633
Changes
1
Hide whitespace changes
Inline
Side-by-side
le.sh
View file @
ebf478f8
...
@@ -254,7 +254,7 @@ issue() {
...
@@ -254,7 +254,7 @@ issue() {
DOMAIN_CONF
=
$WORKING_DIR
/
$Le_Domain
/
$Le_Domain
.conf
DOMAIN_CONF
=
$WORKING_DIR
/
$Le_Domain
/
$Le_Domain
.conf
if
[
-f
"
$DOMAIN_CONF
"
]
;
then
if
[
-f
"
$DOMAIN_CONF
"
]
;
then
source
"
$DOMAIN_CONF
"
source
"
$DOMAIN_CONF
"
if
[
-z
"
$FORCE
"
]
&&
[
"
$(
date
-u
"+%s"
)
"
-lt
"
$Le_NextRenewTime
"
]
;
then
if
[
-z
"
$FORCE
"
]
&&
[
"
$Le_NextRenewTime
"
]
&&
[
"
$(
date
-u
"+%s"
)
"
-lt
"
$Le_NextRenewTime
"
]
;
then
_info
"Skip, Next renwal time is:
$Le_NextRenewTimeStr
"
_info
"Skip, Next renwal time is:
$Le_NextRenewTimeStr
"
return
2
return
2
fi
fi
...
@@ -476,21 +476,7 @@ renew() {
...
@@ -476,21 +476,7 @@ renew() {
echo
Usage:
$0
domain.com
echo
Usage:
$0
domain.com
return
1
return
1
fi
fi
DOMAIN_CONF
=
$WORKING_DIR
/
$Le_Domain
/
$Le_Domain
.conf
if
[
-f
"
$DOMAIN_CONF
"
]
;
then
source
"
$DOMAIN_CONF
"
if
[
"
$(
date
-u
"+%s"
)
"
-lt
"
$Le_NextRenewTime
"
]
;
then
_info
"Skip, Next renwal time is:
$Le_NextRenewTimeStr
"
return
2
fi
fi
if
[
-z
"
$Le_Webroot
"
]
;
then
echo
Le_Webroot can not found, please remove the conf file and issue a new cert
return
1
fi
issue
$Le_Domain
issue
$Le_Domain
}
}
...
@@ -500,6 +486,25 @@ renewAll() {
...
@@ -500,6 +486,25 @@ renewAll() {
for
d
in
$(
ls
-F
$WORKING_DIR
|
grep
'/$'
)
;
do
for
d
in
$(
ls
-F
$WORKING_DIR
|
grep
'/$'
)
;
do
d
=
$(
echo
$d
|
cut
-d
'/'
-f
1
)
d
=
$(
echo
$d
|
cut
-d
'/'
-f
1
)
_info
"renew
$d
"
_info
"renew
$d
"
Le_LinkCert
=
""
Le_Domain
=
""
Le_Alt
=
""
Le_Webroot
=
""
Le_Keylength
=
""
Le_LinkIssuer
=
""
Le_CertCreateTime
=
""
Le_CertCreateTimeStr
=
""
Le_RenewalDays
=
""
Le_NextRenewTime
=
""
Le_NextRenewTimeStr
=
""
Le_RealCertPath
=
""
Le_RealKeyPath
=
""
Le_ReloadCmd
=
""
renew
"
$d
"
renew
"
$d
"
done
done
...
...
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