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
f9126627
Commit
f9126627
authored
Dec 08, 2015
by
Simon Ruderich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use lock file to prevent concurrent access
Closes #31.
parent
85da9090
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
letsencrypt.sh
letsencrypt.sh
+19
-0
No files found.
letsencrypt.sh
View file @
f9126627
...
...
@@ -306,6 +306,25 @@ sign_domain() {
echo
" + Done!"
}
LOCKFILE
=
"
${
BASEDIR
}
/lock"
remove_lock
()
{
if
[[
-n
"
${
LOCKFILE
}
"
]]
;
then
rm
-f
"
${
LOCKFILE
}
"
fi
}
trap
'remove_lock'
EXIT
# Use lock file to prevent concurrent access.
set
-o
noclobber
if
!
{
date
>
"
${
LOCKFILE
}
"
;
}
2>/dev/null
;
then
echo
" + ERROR: Lock file '
${
LOCKFILE
}
' present, aborting."
>
&2
LOCKFILE
=
# so remove_lock doesn't remove it
exit
1
fi
set
+o noclobber
# Get CA URLs
CA_DIRECTORY
=
"
$(
_request get
"
${
CA
}
"
)
"
CA_NEW_CERT
=
"
$(
printf
"%s"
"
${
CA_DIRECTORY
}
"
| get_json_string_value new-cert
)
"
...
...
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