diff --git a/clone/clone b/clone/clone index 91a79a5..f1bcdb1 100755 --- a/clone/clone +++ b/clone/clone @@ -408,16 +408,18 @@ step9(){ # [10] Umount device and share data to server #========================================================# step10(){ - echo "\n>>> Finishing properly"; + echo -e "\n>>> Finishing properly"; echo " (.) Copying SATS public key to server's authorized_keys"; - cat ./server/authorized_keys | tail -n 1 | ssh smmp-server "cat >> ~/authorized_keys" || echo " (!) Cannot share public key"; + cat ./server/authorized_keys | tail -n 1 | ssh smmp-server "cat >> ~/.ssh/authorized_keys" || echo " (!) Cannot share public key"; echo " (.) Copying SATS unlock code to server's database"; DB_PASS="e6mmCpx9Oks5BwS1rcPIrgRDIGLrmDQn9oqX0tqF2VhyiLDW6yKJFrafewwCZ63njYaDKiNjiAS11hrLYij7HaxTdHb33tEqby34vgVrUYaUnwPnCJHmkoyR3TfjcZNCPti8VZG0Oooq7qSHy4lcD6T4EFCcOQ_yHjVIfibvbuZqQcPTUvbDP_9910mRDBUADShIe4sjK2FLOTCz6usUKkNqTH3PldRfAgGl182Zw9tiSPJfvQZX3S2bKblNuZf1"; DB_USER="sats-set-unlock"; DB_DATABASE="logauth"; ssh smmp-server "echo \"UPDATE machine SET unlock_code='$UNLOCK_CODE' WHERE id_machine = $MACHINE_ID;\" | mysql -u$DB_USER -p$DB_PASS --database=$DB_DATABASE" || echo " (!) Cannot share unlock code"; + # and locally for testing purpose + echo "UPDATE machine SET unlock_code='$UNLOCK_CODE' WHERE id_machine = $MACHINE_ID;" | mysql -u$DB_USER -p$DB_PASS --database=$DB_DATABASE || echo " (!) Cannot share unlock code"; echo " (.) Unmounting remote device"; sudo umount /mnt;