index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2022-01-22 09:57:42 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2022-01-22 09:57:42 +0100 |
commit | 2efd41488dfef764dadda6d6a970de813b21419a (patch) | |
tree | 5d803e3385e498fcf98f6f0264e859fa793b188f /bin/manage-slaves | |
parent | de26d3c539b999a771eeba329f24fc593d9672ed (diff) |
-rwxr-xr-x | bin/manage-slaves | 16 |
diff --git a/bin/manage-slaves b/bin/manage-slaves index cddda84..3dbd83a 100755 --- a/bin/manage-slaves +++ b/bin/manage-slaves @@ -9,6 +9,7 @@ usage() { >&2 echo 'manage-slaves $action [parameters]: manage the list of build slaves' >&2 echo '' >&2 echo 'possible actions:' + >&2 echo ' list' >&2 echo ' add $name $owner $ssh-key-fingerprint' >&2 echo ' disable $name' >&2 echo ' enable $name' @@ -33,6 +34,21 @@ if errors=$( fi case "$1" in + 'list') + infos=$( + # shellcheck disable=SC2016 + { + printf 'SELECT' + printf ' name, CASE WHEN access_allowed = 1 THEN "enabled" ELSE "disabled" END ' + printf ' name, CASE WHEN is_sane = 1 THEN "sane" ELSE "not sane" END ' + printf ' FROM build_slaves' + printf ';\n' + } | \ + mysql_run_query | \ + tr '\t' ' ' + ) + echo "${infos[@]}" + ;; 'add') shift if [ $# -ne 3 ]; then |