Skip to content
Snippets Groups Projects
Verified Commit b5af71fb authored by Michal Hrusecky's avatar Michal Hrusecky :mouse:
Browse files

haas-proxy: Making even more sure that registration will go through

parent 354514a5
Branches
Tags
No related merge requests found
......@@ -22,13 +22,13 @@
TIMEOUT=120
CA_FILE=/etc/ssl/www_turris_cz_ca.pem # let's encrypt inside
if uci -q get haas.settings.token 2>&1 >/dev/null ; then
if [ -n "`uci -q get haas.settings.token 2>&1 >/dev/null`" ]; then
:
else
set -e
CODE=$(cat /usr/share/server-uplink/registration_code)
URL="https://haas.nic.cz/api/turris/register"
TOKEN=$(curl -s -H "Content-Type: application/json" \
TOKEN=$(curl --faill -s -H "Content-Type: application/json" \
-X POST -d "{\"registration_code\": \"${CODE}\"}" \
--cacert "$CA_FILE" \
-m "${TIMEOUT}" \
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment