From 76a084e4d15a1bdd95747d59bd7ffe00cc78f747 Mon Sep 17 00:00:00 2001 From: Corentin LABBE Date: Tue, 24 Jul 2018 14:09:59 +0200 Subject: lavalab-gen.py: token is optional for users --- lava-master/scripts/setup.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lava-master/scripts/setup.sh') 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 -- cgit 1.2.3-korg