*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit bd1fdd5b authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

Add option to disable SSL verification on check-records.sh

* this is useful for local/development instances that have self-signed
  certificates and thus wouldn't pass the SSL check
parent fefa8b57
No related branches found
No related tags found
1 merge request!6Add option to disable SSL verification on check-records.sh
......@@ -5,7 +5,42 @@
#
# requires `curl` and `jq` to be installed
set -eu
base_url="${BASE_URL:-https://test.researchdata.tuwien.ac.at}"
check_ssl=1
function usage() {
echo "usage: $0 [-k] [ BASE_URL ]"
echo
echo " -k Disable SSL verification"
}
function curl() {
if [[ "${check_ssl}" -gt 0 ]]; then
command curl "$@"
else
command curl -k "$@"
fi
}
# parse arguments
while getopts "hk" opt; do
case "${opt}" in
h)
usage
exit 0
;;
k)
check_ssl=0
;;
*)
usage >&2
exit 1
;;
esac
done
shift $(( OPTIND - 1 ))
if [[ $# -gt 0 ]]; then
base_url="$1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment