aboutsummaryrefslogtreecommitdiffstats
path: root/lava-master
diff options
context:
space:
mode:
Diffstat (limited to 'lava-master')
-rwxr-xr-xlava-master/scripts/setup.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/lava-master/scripts/setup.sh b/lava-master/scripts/setup.sh
index ad10238..6ab0663 100755
--- a/lava-master/scripts/setup.sh
+++ b/lava-master/scripts/setup.sh
@@ -70,8 +70,13 @@ if [ -e /root/lava-callback-tokens ];then
echo "Missing DESCRIPTION for $USER"
exit 1
fi
- echo "Adding $USER ($DESCRIPTION) DEBUG($TOKEN)"
- lava-server manage tokens add --user $USER --secret $TOKEN --description "$DESCRIPTION" || exit 1
+ lava-server manage tokens list --user $USER |grep -q $TOKEN
+ if [ $? -eq 0 ];then
+ echo "SKIP already present token for $USER"
+ else
+ echo "Adding $USER ($DESCRIPTION) DEBUG($TOKEN)"
+ lava-server manage tokens add --user $USER --secret $TOKEN --description "$DESCRIPTION" || exit 1
+ fi
done
fi