diff options
author | khilman <khilman@users.noreply.github.com> | 2018-07-24 07:55:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-24 07:55:15 -0500 |
commit | baf680990ecb539cde0a16ef5b32a7321dd4538a (patch) | |
tree | 5362228f4a266208bacb24f441c9b4c611563388 /lava-master/scripts | |
parent | ef276f04512f1808ae7e9fbb2e3b904855486462 (diff) | |
parent | 76a084e4d15a1bdd95747d59bd7ffe00cc78f747 (diff) |
Merge pull request #35 from montjoie/token_fix
lavalab-gen.py: token is optional for users
Diffstat (limited to 'lava-master/scripts')
-rwxr-xr-x | lava-master/scripts/setup.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lava-master/scripts/setup.sh b/lava-master/scripts/setup.sh index c7807dc..dd0d58f 100755 --- a/lava-master/scripts/setup.sh +++ b/lava-master/scripts/setup.sh @@ -29,6 +29,7 @@ if [ -e /root/lava-users ];then USER_OPTION="" STAFF=0 SUPERUSER=0 + TOKEN="" . /root/lava-users/$ut if [ -z "$PASSWORD" -o "$PASSWORD" = "$TOKEN" ];then echo "Generating password..." @@ -48,6 +49,7 @@ if [ -e /root/lava-users ];then echo "Adding username $USER DEBUG(with $TOKEN / $PASSWORD / $USER_OPTION)" lava-server manage users add --passwd $PASSWORD $USER_OPTION $USER || exit 1 if [ ! -z "$TOKEN" ];then + echo "Adding token to user $USER" lava-server manage tokens add --user $USER --secret $TOKEN || exit 1 fi fi |