Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
103
Merge Requests
103
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
6cbce4d8
Commit
6cbce4d8
authored
Aug 06, 2013
by
Cédric Le Ninivin
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check-url: Add check-secure parameter to return success in case of code 401
parent
dadcae27
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
slapos/recipe/check_url_available/__init__.py
slapos/recipe/check_url_available/__init__.py
+1
-0
slapos/recipe/check_url_available/template/check_url.in
slapos/recipe/check_url_available/template/check_url.in
+7
-0
No files found.
slapos/recipe/check_url_available/__init__.py
View file @
6cbce4d8
...
...
@@ -37,6 +37,7 @@ class Recipe(GenericBaseRecipe):
'url'
:
self
.
options
[
'url'
],
'shell_path'
:
self
.
options
[
'dash_path'
],
'curl_path'
:
self
.
options
[
'curl_path'
],
'check_secure'
:
self
.
options
.
get
(
'check-secure'
,
0
)
}
# XXX-Cedric in this script, curl won't check certificate
...
...
slapos/recipe/check_url_available/template/check_url.in
View file @
6cbce4d8
...
...
@@ -31,6 +31,13 @@ if [ $CODE -eq 000 ]; then
exit 1
fi
if [ %(check_secure)s -eq 1 ]; then
if [ $CODE -eq 401 ]; then
echo "$URL is protected (returned $CODE)." >&2
exit 0
fi
fi
if ! [ $CODE -eq 200 ]; then
echo "$URL is not available (returned $CODE)." >&2
exit 2
...
...
Jérome Perrin
@jerome
mentioned in merge request
slapos.toolbox!98 (closed)
·
Jun 29, 2021
mentioned in merge request
slapos.toolbox!98 (closed)
mentioned in merge request slapos.toolbox!98
Toggle commit list
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