Explorar o código

api report key

Gamaliel Espinoza %!s(int64=7) %!d(string=hai) anos
pai
achega
55b2549c26
Modificáronse 1 ficheiros con 5 adicións e 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"