hydra: declarative users fixups
This commit is contained in:
parent
6d536cb5e2
commit
3fdc2d23d2
1 changed files with 2 additions and 2 deletions
|
@ -146,7 +146,7 @@ in
|
||||||
path = with pkgs; [ hydra-unstable netcat ];
|
path = with pkgs; [ hydra-unstable netcat ];
|
||||||
script = ''
|
script = ''
|
||||||
set -e
|
set -e
|
||||||
while IFS=; read -r user role passwordhash email fullname; do
|
while IFS=';' read -r user role passwordhash email fullname; do
|
||||||
opts=("$user" "--role" "$role" "--password-hash" "$passwordhash")
|
opts=("$user" "--role" "$role" "--password-hash" "$passwordhash")
|
||||||
if [[ -n "$email" ]]; then
|
if [[ -n "$email" ]]; then
|
||||||
opts+=("--email-address" "$email")
|
opts+=("--email-address" "$email")
|
||||||
|
@ -154,7 +154,7 @@ in
|
||||||
if [[ -n "$fullname" ]]; then
|
if [[ -n "$fullname" ]]; then
|
||||||
opts+=("--full-name" "$fullname")
|
opts+=("--full-name" "$fullname")
|
||||||
fi
|
fi
|
||||||
hydra-create-user "$opts{@}"
|
hydra-create-user "''${opts[@]}"
|
||||||
done < ${cfg.services.hydra.usersFile}
|
done < ${cfg.services.hydra.usersFile}
|
||||||
|
|
||||||
while ! nc -z localhost ${toString hydraPort}; do
|
while ! nc -z localhost ${toString hydraPort}; do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue