If you just run
as supplied, it will ask you for your account login,after which it will register new services for this device, based on the lines towards the end of the file:
# ----- Edit the lines below to specify which services you want to have installed
# line syntax is:
# should be one of: ssh, web, webp, vnc, tcp, rmt3
# rmt3 is used to enable Remote3.it fleet management services
# is the port number of the service you wish to connect to
# except for rmt3, set to 65535
# and should be unique for each entry, i.e. you cannot have multiple
# entries which are "ssh 22" but you could have "ssh 22", "ssh 23", "tcp 22".
# is a quote-enclosed expression which should be unique for every device
makeConnection rmt3 65535 "$SERVICEBASENAME-rmt3"
makeConnection ssh 22 "$SERVICEBASENAME-ssh-22"
# makeConnection web 80 "$SERVICEBASENAME-web-80"
# makeConnection tcp 3389 "$SERVICEBASENAME-tcp-3389"
So,this would create services for rmt3 (which is the "Device Name" and is not used for connections) and ssh on port 22. If you uncomment the other 2 makeConnection lines then you'd also install a service for web on port 80 and tcp on port 3389 (which is remote desktop protocol).
The "SERVICEBASENAME" variable is used to give each physical device a unique name based on something readable via command line. You will find the function which creates this value in /usr/bin/weavedlibrary. As supplied, it concatenates the eth0 MAC address with a random number, which is saved in a text file in /etc/weaved so that each subsequent service install can use the same SERVICEBASENAME.
That is ONE way to register services to your device, but it does require you to enter the account credentials when you run it. We do not suggest making a script which permanently stores your credentials on the device image for security reasons.
You may also wish to use bulk registration, which more closely matches your request. This does not require you to enter the account credentials. This process is described here: http://forum.weaved.com/t/remot3-it-register-devices-a-k-a-bulk-registration/1131
Let me know if you have any other questions!