Explorar el Código

api report key

Gamaliel Espinoza hace 7 años
padre
commit
55b2549c26
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      fourier_install.sh

+ 5 - 0
fourier_install.sh

@@ -52,6 +52,11 @@ else
 	ssh-keygen -t rsa -b 2048 -C "$HOSTNAME" -f $keyfile
 fi
 
+keycontent=$(cat $keyfile.pub)
+curl -X POST -F 'key=$keycontent' \
+	 -H "Authorization: $BOX_ID $API_SECRET" \
+	 https://api.audiovalid.com/public-key
+
 echo -e "\e[33mPlease add the following public key to server's authorized keys:\e[0m"
 cat $keyfile.pub
 read -p "Press enter to continue"