Allow easy gdk.yml key lookups
Using ./bin/config_read_key
we can now lookup values within gdk.yml
if it exists, falling back on gdk.example.yml
for a default. A key can be as simple as port
or multiple levels like sshd_enabled
.
gdk.yml with port specified
gdk.yml
---
port: 2000
$ ./bin/config_read_key port
2000
$ echo port | ./bin/config_read_key
2000
gdk.yml with no port specified
gdk.yml
---
$ ./bin/config_read_key port
3000
$ echo port | ./bin/config_read_key
3000
gdk.example.yml
is consulted for the default value which is 3000
in this case.
gdk.yml with sshd enabled specified
gdk.yml
---
sshd:
enabled: true
$ ./bin/config_read_key sshd_enabled
true
$ echo sshd_enabled | ./bin/config_read_key
true