Add a function to check whether a config is set
This commit is contained in:
parent
1037ace214
commit
cd81edf1a7
1 changed files with 4 additions and 0 deletions
|
@ -4,6 +4,10 @@ function getConfig -S -a property
|
|||
evalModule "$CONFIG_MODULE" "$property" $argv[2..]
|
||||
end
|
||||
|
||||
function isSet -S -a property
|
||||
not test "$(getConfig "$property" --json)" = "null"
|
||||
end
|
||||
|
||||
function collectionActive -S -a name
|
||||
[ "$(getConfig "valhalla.software.$name" --json)" = "true" ]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue