From a54076f61b8211acefeb18a41658e3ab9909cbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Mon, 2 Nov 2020 14:56:07 +0100 Subject: [PATCH] add zombie script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- scripts/zombies.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scripts/zombies.sh diff --git a/scripts/zombies.sh b/scripts/zombies.sh new file mode 100644 index 000000000..cfc2c7a6f --- /dev/null +++ b/scripts/zombies.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +[[ -z "$OFFSET" ]] && OFFSET=1 +[[ -z "$COUNT" ]] && "$((COUNT = 1000))" + +: "$((i=OFFSET))" +: "$((end=OFFSET+COUNT))" +while [ "$((i <= end))" -ne 0 ] +do + echo "creating zombie $i" + curl -X POST 'https://localhost:9200/ocs/v1.php/cloud/users' -k -u admin:admin -d userid="zombie$i" -d password="zombie" -d email="zombie$i@example.org" + #$DIR/../ocis/bin/ocis accounts add --preferred-name zombie$i --on-premises-sam-account-name zombie$i --mail zombie$i@example.org + : "$((i = i + 1))" +done