From 2afca1109a086c4a4d6aa2189ebf3d81e4ddbde5 Mon Sep 17 00:00:00 2001 From: Rodrigo Carpintero Date: Mon, 28 Dec 2020 17:52:10 -0300 Subject: [PATCH 1/3] support multiple license keys in linux/automated-installer --- linux/automated-installer/automated-installer | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/linux/automated-installer/automated-installer b/linux/automated-installer/automated-installer index 3a79f3c..22a2edf 100755 --- a/linux/automated-installer/automated-installer +++ b/linux/automated-installer/automated-installer @@ -250,7 +250,7 @@ check_arguments() { data_dir="${OPTARG}" ;; k) - license_key="${OPTARG}" + license_keys=$(echo ${license_keys} ${OPTARG}) # append and trim ;; s) secrets_file="${OPTARG}" @@ -582,10 +582,12 @@ setup() { print "Setting up initial configuration..." print "Activating..." - if [ "$license_key" == "" ]; then + if [ "$license_keys" == "" ]; then run_tsm licenses activate --trial - else - run_tsm licenses activate --license-key "${license_key}" + else for license_key in $license_keys + do + run_tsm licenses activate --license-key "${license_key}" + done fi print "Registering product..." @@ -657,7 +659,7 @@ main() { local registration_file='' local accept_eula_arg='' local force_arg='' - local license_key='' + local license_keys='' local group_username='' local running_username='' local bootstrap_file='' From 5f00f31e5d4a5ad0488bb4e97817390771eccc06 Mon Sep 17 00:00:00 2001 From: Rodrigo Carpintero Date: Tue, 21 Jun 2022 14:03:30 -0300 Subject: [PATCH 2/3] update help --- linux/automated-installer/automated-installer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/automated-installer/automated-installer b/linux/automated-installer/automated-installer index 7d55021..8524470 100755 --- a/linux/automated-installer/automated-installer +++ b/linux/automated-installer/automated-installer @@ -57,7 +57,7 @@ show_help() { -c config-name Set the service configuration name. When not set, the initialize-tsm script uses its default value. - -k license-key Specify product key used to activate Tableau Server. + -k license-key Specify product key(s) used to activate Tableau Server. When not set, a trial license will be activated. -g Do NOT add the current user to the "tsmadmin" administrative From ff443395739764c560341eae2bb67cd80c6aadbc Mon Sep 17 00:00:00 2001 From: Rodrigo Carpintero Date: Tue, 21 Jun 2022 14:18:07 -0300 Subject: [PATCH 3/3] keep single-line "else" standard --- linux/automated-installer/automated-installer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/automated-installer/automated-installer b/linux/automated-installer/automated-installer index 8524470..debd004 100755 --- a/linux/automated-installer/automated-installer +++ b/linux/automated-installer/automated-installer @@ -582,8 +582,8 @@ setup() { print "Activating..." if [ "$license_keys" == "" ]; then run_tsm licenses activate --trial - else for license_key in $license_keys - do + else + for license_key in $license_keys; do run_tsm licenses activate --license-key "${license_key}" done fi