IOT on cloned PI
Hey team...
Is there a way to script the setup of the IOT agent on a cloned machine? for example...The script would search for the teamviewer ID of the original machine (in this case a raspberry pi 3) if the old ID is found, the script would insert the necessary info to connect the clone to a teamviewer account automatically with a new teamviewer ID
Is this possible? Are there files that can be changed for an unattended setup of the IOT agent? We have hundreds of PIs about to go to the field and this would be HUGELY helpful. I'm solid on bash scripts I just need to know the files to mod.
Thanks!
Best Answer
-
Hey folks...
I answered my own question here. It does not appear there is a way to do this directly with IOT config files but it does work using expect. Here's the basics:
/usr/bin/teamviewer-iot-agent stop
rm -f /var/lib/teamviewer-iot-agent/global.conf
/usr/bin/teamviewer-iot-agent restart
/usr/bin/expect -c "
spawn teamviewer-iot-agent setup
expect \"Accept License Agreement? (y/n)\" {
send \"y\r\"
expect \"TeamViewer account (email):\"
send \"<email.address>\r\"
expect \"Password:\"
send \"<password>\r\"
exp_continue
}
"And dont forget to reinstall the agent to fix any missing files...
/usr/bin/dpkg -i teamviewer-iot-agent-*.deb
enjoy!
5
Answers
-
Hey folks...
I answered my own question here. It does not appear there is a way to do this directly with IOT config files but it does work using expect. Here's the basics:
/usr/bin/teamviewer-iot-agent stop
rm -f /var/lib/teamviewer-iot-agent/global.conf
/usr/bin/teamviewer-iot-agent restart
/usr/bin/expect -c "
spawn teamviewer-iot-agent setup
expect \"Accept License Agreement? (y/n)\" {
send \"y\r\"
expect \"TeamViewer account (email):\"
send \"<email.address>\r\"
expect \"Password:\"
send \"<password>\r\"
exp_continue
}
"And dont forget to reinstall the agent to fix any missing files...
/usr/bin/dpkg -i teamviewer-iot-agent-*.deb
enjoy!
5 -
Hello @jwilsonatvars
Thank you for your post on our Community.
In order to assist with you with mass provisioning on your Raspberry Pi s, we will contact you directly.
The suggested way will not work unfortunately and we would like to work with you on a method to easily povision your hundreds of Pi s.
Best regards,
Patrick0 -
Hi @PatrickG
I am having the same issue. Would you be able to assist me as well, please? Thank you.
0 -
Hi @speaktoomey
Yes, sure. Please contact us via this form to get in touch with us directly and help you on mass provisioning:
https://www.teamviewer.com/en/support/contact/
Thanks,
Patrick
1