Digibeectl Realm Switch
This script let's you switch between Digibee realms.. Before using it, make sure you have digibeectl installed on your computer
- Install digibeectl on your MAC or LINUX computer as described on Digibeectl Official Documentation.
curl -s https://storage.googleapis.com/digibee-release-test/releases/install.sh | bash
- Configure digibeectl on your MAC or LINUX computer as described on Digibeectl Official Documentation.
digibeectl set config --file "path/file.json" --secret-key "encryption-key" --auth-key "encryption-passphrase"
- Clone this repo on your MAC or LINUX computer
git clone https://github.com/arturscheiner/dgb-realmswitch.git
- Access the cloned directory "dgb-realmswitch"
cd ./dgb-realmswitch
- From inside the cloned directory, deploy this script in your $PATH. On this step the script will copy itself on the directory specified as a parameter. The directory must be a $PATH directory, otherwise you will not be able to run the command anywhere in your workstation, without the "./" in front of it.
sudo ./dgb-rs -d /usr/local/bin
- Add the actual digibeectl configuration to the realm switch list. PS: If you wanna add another realm to the list, navigate through the steps 7 and 8. If not, follow the step 9, and continue from there.
dgb-rs -a
- If you want to add another realm to the switch list, first unset the realm.
dgb-rs -u
-
After unsetting the realm as described above, repeat the steps 2 and 6.
- Step 2 -> configure a new realm with digibeectl
- Step 6 -> add the realm to the switch list
-
To get all of the realms in the switch list, run:
dgb-rs -l
- To switch between realms, just run:
dgb-rs -s realm-name
- Get some HELP
dgb-rs -h
Help Information
Syntax: dgb-rs [-a|l|r|s|u|c|d|h] params
about realm stuff
a Add a new realm to the switch list
E.g. -> dgb-rs -a
l List all the realms configured
E.g. -> dgb-rs -l
r Remove a realm from the switch list
E.g. -> dgb-rs -r realm-name
s Set an active realm
E.g. -> dgb-rs -s realm-name
u Unset the active realm
E.g. -> dgb-rs -u
about anything else
h Show this help information
E.g. -> dgb-rs -h
Obs: These two options just work when running ./dgb-rs inside the repo cloned folder.
about this script
c Check this script deployment
E.g. -> ./dgb-rs -c
d Deploy this script into a directory
E.g. -> sudo ./dgb-rs -d /usr/local/bin