Selaa lähdekoodia

api report key

Gamaliel Espinoza 7 vuotta sitten
vanhempi
commit
55b2549c26
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  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"