From 2c2cad3959d467a1d4072d813e9c00bf21b3fd3b Mon Sep 17 00:00:00 2001 From: Drew Hubl Date: Thu, 21 Jun 2018 13:16:33 -0700 Subject: [PATCH] Don't redundantly chown the configuration file, and move the --config-file option to st2 instead of the login subcommand --- scripts/includes/common.sh | 8 ++++---- scripts/st2bootstrap-deb.sh | 8 ++++---- scripts/st2bootstrap-el6.sh | 8 ++++---- scripts/st2bootstrap-el7.sh | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/includes/common.sh b/scripts/includes/common.sh index 61c6a6f1..c9b2c548 100644 --- a/scripts/includes/common.sh +++ b/scripts/includes/common.sh @@ -181,8 +181,8 @@ configure_st2_cli_config() { CURRENT_USER_CLI_CONFIG_DIRECTORY="${HOME}/.st2" CURRENT_USER_CLI_CONFIG_PATH="${CURRENT_USER_CLI_CONFIG_DIRECTORY}/config" - sudo st2 login --config-file ${ROOT_USER_CLI_CONFIG_PATH} \ - --write-password \ + sudo st2 --config-file ${ROOT_USER_CLI_CONFIG_PATH} \ + login --write-password \ --username ${USERNAME} --password ${PASSWORD} # Write config for root user @@ -191,8 +191,8 @@ configure_st2_cli_config() { fi # Write config for current user (in case current user != root) - st2 login --config-file ${CURRENT_USER_CLI_CONFIG_PATH} \ - --write-password \ + st2 --config-file ${CURRENT_USER_CLI_CONFIG_PATH} \ + login --write-password \ --username ${USERNAME} --password ${PASSWORD} # Fix the permissions diff --git a/scripts/st2bootstrap-deb.sh b/scripts/st2bootstrap-deb.sh index 86a09329..3d354f66 100644 --- a/scripts/st2bootstrap-deb.sh +++ b/scripts/st2bootstrap-deb.sh @@ -298,8 +298,8 @@ configure_st2_cli_config() { CURRENT_USER_CLI_CONFIG_DIRECTORY="${HOME}/.st2" CURRENT_USER_CLI_CONFIG_PATH="${CURRENT_USER_CLI_CONFIG_DIRECTORY}/config" - sudo st2 login --config-file ${ROOT_USER_CLI_CONFIG_PATH} \ - --write-password \ + sudo st2 --config-file ${ROOT_USER_CLI_CONFIG_PATH} \ + login --write-password \ --username ${USERNAME} --password ${PASSWORD} # Write config for root user @@ -308,8 +308,8 @@ configure_st2_cli_config() { fi # Write config for current user (in case current user != root) - st2 login --config-file ${CURRENT_USER_CLI_CONFIG_PATH} \ - --write-password \ + st2 --config-file ${CURRENT_USER_CLI_CONFIG_PATH} \ + login --write-password \ --username ${USERNAME} --password ${PASSWORD} # Fix the permissions diff --git a/scripts/st2bootstrap-el6.sh b/scripts/st2bootstrap-el6.sh index ee768909..cc4ad9b6 100644 --- a/scripts/st2bootstrap-el6.sh +++ b/scripts/st2bootstrap-el6.sh @@ -293,8 +293,8 @@ configure_st2_cli_config() { CURRENT_USER_CLI_CONFIG_DIRECTORY="${HOME}/.st2" CURRENT_USER_CLI_CONFIG_PATH="${CURRENT_USER_CLI_CONFIG_DIRECTORY}/config" - sudo st2 login --config-file ${ROOT_USER_CLI_CONFIG_PATH} \ - --write-password \ + sudo st2 --config-file ${ROOT_USER_CLI_CONFIG_PATH} \ + login --write-password \ --username ${USERNAME} --password ${PASSWORD} # Write config for root user @@ -303,8 +303,8 @@ configure_st2_cli_config() { fi # Write config for current user (in case current user != root) - st2 login --config-file ${CURRENT_USER_CLI_CONFIG_PATH} \ - --write-password \ + st2 --config-file ${CURRENT_USER_CLI_CONFIG_PATH} \ + login --write-password \ --username ${USERNAME} --password ${PASSWORD} # Fix the permissions diff --git a/scripts/st2bootstrap-el7.sh b/scripts/st2bootstrap-el7.sh index 2e5d36c4..5cfde65f 100644 --- a/scripts/st2bootstrap-el7.sh +++ b/scripts/st2bootstrap-el7.sh @@ -293,8 +293,8 @@ configure_st2_cli_config() { CURRENT_USER_CLI_CONFIG_DIRECTORY="${HOME}/.st2" CURRENT_USER_CLI_CONFIG_PATH="${CURRENT_USER_CLI_CONFIG_DIRECTORY}/config" - sudo st2 login --config-file ${ROOT_USER_CLI_CONFIG_PATH} \ - --write-password \ + sudo st2 --config-file ${ROOT_USER_CLI_CONFIG_PATH} \ + login --write-password \ --username ${USERNAME} --password ${PASSWORD} # Write config for root user @@ -303,8 +303,8 @@ configure_st2_cli_config() { fi # Write config for current user (in case current user != root) - st2 login --config-file ${CURRENT_USER_CLI_CONFIG_PATH} \ - --write-password \ + st2 --config-file ${CURRENT_USER_CLI_CONFIG_PATH} \ + login --write-password \ --username ${USERNAME} --password ${PASSWORD} # Fix the permissions