Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
letsencrypt.sh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
letsencrypt.sh
Commits
9c69b624
Commit
9c69b624
authored
Dec 06, 2015
by
Markus Germeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show expire date when we don't need to renew a certifcate
parent
ae8e5c8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
letsencrypt.sh
letsencrypt.sh
+2
-1
No files found.
letsencrypt.sh
View file @
9c69b624
...
@@ -221,7 +221,8 @@ fi
...
@@ -221,7 +221,8 @@ fi
echo
-n
"Found existing cert for
${
domain
}
. Expire date ..."
echo
-n
"Found existing cert for
${
domain
}
. Expire date ..."
set
+e
;
openssl x509
-checkend
$((${
RENEW_DAYS
}
*
86400
))
-noout
-in
"certs/
${
domain
}
/cert.pem"
;
expiring
=
$?
;
set
-e
set
+e
;
openssl x509
-checkend
$((${
RENEW_DAYS
}
*
86400
))
-noout
-in
"certs/
${
domain
}
/cert.pem"
;
expiring
=
$?
;
set
-e
if
[[
${
expiring
}
-eq
0
]]
;
then
if
[[
${
expiring
}
-eq
0
]]
;
then
echo
" is not within
${
RENEW_DAYS
}
days. Skipping"
valid
=
$(
openssl x509
-text
-noout
-in
"certs/
${
domain
}
/cert.pem"
|
grep
-i
"not after"
|
cut
-d
:
-f2-
)
echo
"
${
valid
}
Skipping. (Valid longer than
${
RENEW_DAYS
}
days.)"
continue
continue
fi
fi
echo
" is within
${
RENEW_DAYS
}
days. Renewing..."
echo
" is within
${
RENEW_DAYS
}
days. Renewing..."
...
...
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