A sample admin NodeJS script to manually set a controller to a Juno satellite.
Note
Make sure you have Juno's CLI (npm i -g @junobuild/cli) installed on your machine.
git clone https://github.com/junobuild/examples
cd examples/node/admin/controller
npm ciRun following command in your terminal to execute the script.
juno run --src index.mjs --controllerId=<the-principal-id>Replace <the-principal-id> with the ID of the principal you are looking to set as a controller.
You can also provide a hint - like a name - for the particular profile.
juno run --src index.mjs --controllerId=<the-principal-id> --profile=my_controller_nameIf you wish to use this script to configure your satellite, following environment options have to be set in .env.
JUNO_MISSION_CONTROL_ID: your mission control ID
Adapt your Satellite IDs in the juno.config.mjs.