Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dehydrated-zope-hook
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
dehydrated-zope-hook
Commits
afdcc7cf
Commit
afdcc7cf
authored
Nov 25, 2016
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support altnames.
parent
4fae1355
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
22 deletions
+30
-22
zope-hook.sh
zope-hook.sh
+30
-22
No files found.
zope-hook.sh
View file @
afdcc7cf
...
...
@@ -3,38 +3,46 @@ set -e
set
-u
set
-o
pipefail
domain
=
"
${
2
}
"
token_id
=
"
${
3
}
"
token
=
"
${
4
}
"
operation
=
"
${
1
}
"
;
shift
case
"
${
1
}
"
in
case
"
${
operation
}
"
in
"deploy_challenge"
)
statuscode
=
"
$(
curl
-s
-k
-n
-L
-o
/dev/null
-w
"%{http_code}"
"https://
${
domain
}
/.well-known/acme-challenge/manage_addFile?id=
${
token_id
}
"
)
"
if
[[
!
"
${
statuscode
:0:1
}
"
=
"2"
]]
;
then
statuscode
=
"
$(
curl
-s
-n
-L
-o
/dev/null
-w
"%{http_code}"
"http://
${
domain
}
/.well-known/acme-challenge/manage_addFile?id=
${
token_id
}
"
)
"
while
[
"$#"
!=
0
]
;
do
domain
=
"
${
1
}
"
;
shift
token_id
=
"
${
1
}
"
;
shift
token
=
"
${
1
}
"
;
shift
statuscode
=
"
$(
curl
-s
-k
-n
-L
-o
/dev/null
-w
"%{http_code}"
"https://
${
domain
}
/.well-known/acme-challenge/manage_addFile?id=
${
token_id
}
"
)
"
if
[[
!
"
${
statuscode
:0:1
}
"
=
"2"
]]
;
then
echo
'Failed'
exit
1
statuscode
=
"
$(
curl
-s
-n
-L
-o
/dev/null
-w
"%{http_code}"
"http://
${
domain
}
/.well-known/acme-challenge/manage_addFile?id=
${
token_id
}
"
)
"
if
[[
!
"
${
statuscode
:0:1
}
"
=
"2"
]]
;
then
echo
'Failed'
exit
1
fi
fi
fi
statuscode
=
"
$(
curl
-s
-k
-n
-L
-o
/dev/null
-w
"%{http_code}"
"https://
${
domain
}
/.well-known/acme-challenge/
${
token_id
}
/manage_edit?title=&content_type=text/plain&filedata=
${
token
}
"
)
"
if
[[
!
"
${
statuscode
:0:1
}
"
=
"2"
]]
;
then
statuscode
=
"
$(
curl
-s
-n
-L
-o
/dev/null
-w
"%{http_code}"
"http://
${
domain
}
/.well-known/acme-challenge/
${
token_id
}
/manage_edit?title=&content_type=text/plain&filedata=
${
token
}
"
)
"
statuscode
=
"
$(
curl
-s
-k
-n
-L
-o
/dev/null
-w
"%{http_code}"
"https://
${
domain
}
/.well-known/acme-challenge/
${
token_id
}
/manage_edit?title=&content_type=text/plain&filedata=
${
token
}
"
)
"
if
[[
!
"
${
statuscode
:0:1
}
"
=
"2"
]]
;
then
echo
'Failed'
exit
1
statuscode
=
"
$(
curl
-s
-n
-L
-o
/dev/null
-w
"%{http_code}"
"http://
${
domain
}
/.well-known/acme-challenge/
${
token_id
}
/manage_edit?title=&content_type=text/plain&filedata=
${
token
}
"
)
"
if
[[
!
"
${
statuscode
:0:1
}
"
=
"2"
]]
;
then
echo
'Failed'
exit
1
fi
fi
fi
done
;;
"clean_challenge"
)
statuscode
=
"
$(
curl
-s
-k
-n
-L
-o
/dev/null
-w
"%{http_code}"
"https://
${
domain
}
/.well-known/acme-challenge/manage_delObjects?ids:list=
${
token_id
}
"
)
"
if
[[
!
"
${
statuscode
:0:1
}
"
=
"2"
]]
;
then
statuscode
=
"
$(
curl
-s
-n
-L
-o
/dev/null
-w
"%{http_code}"
"http://
${
domain
}
/.well-known/acme-challenge/manage_delObjects?ids:list=
${
token_id
}
"
)
"
while
[
"$#"
!=
0
]
;
do
domain
=
"
${
1
}
"
;
shift
token_id
=
"
${
1
}
"
;
shift
token
=
"
${
1
}
"
;
shift
statuscode
=
"
$(
curl
-s
-k
-n
-L
-o
/dev/null
-w
"%{http_code}"
"https://
${
domain
}
/.well-known/acme-challenge/manage_delObjects?ids:list=
${
token_id
}
"
)
"
if
[[
!
"
${
statuscode
:0:1
}
"
=
"2"
]]
;
then
echo
'Failed'
exit
1
statuscode
=
"
$(
curl
-s
-n
-L
-o
/dev/null
-w
"%{http_code}"
"http://
${
domain
}
/.well-known/acme-challenge/manage_delObjects?ids:list=
${
token_id
}
"
)
"
if
[[
!
"
${
statuscode
:0:1
}
"
=
"2"
]]
;
then
echo
'Failed'
exit
1
fi
fi
fi
done
;;
esac
...
...
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