Repository: incubator-stratos Updated Branches: refs/heads/master 623e37eb1 -> 8bd322477
allow stratos-setup.sh script to start servers without prompting user Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/62946a20 Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/62946a20 Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/62946a20 Branch: refs/heads/master Commit: 62946a206097e6fe118885719a7ef68ab3e8b773 Parents: 75d5b26 Author: Chris Snow <[email protected]> Authored: Thu Mar 27 17:27:29 2014 +0000 Committer: Chris Snow <[email protected]> Committed: Thu Mar 27 17:27:29 2014 +0000 ---------------------------------------------------------------------- tools/stratos-installer/stratos-setup.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/62946a20/tools/stratos-installer/stratos-setup.sh ---------------------------------------------------------------------- diff --git a/tools/stratos-installer/stratos-setup.sh b/tools/stratos-installer/stratos-setup.sh index 11e9d4d..a65fa40 100755 --- a/tools/stratos-installer/stratos-setup.sh +++ b/tools/stratos-installer/stratos-setup.sh @@ -39,19 +39,21 @@ cep="false" product_list="mb;cc;cep;as;sm" enable_internal_git=false activemq_client_libs=(activemq-broker-5.8.0.jar activemq-client-5.8.0.jar geronimo-j2ee-management_1.1_spec-1.0.1.jar geronimo-jms_1.1_spec-1.1.1.jar hawtbuf-1.2.jar) +auto_start_servers="false" function help { echo "" echo "Usage:" - echo "stratos-setup.sh -u <host username> -p \"all\"" + echo "stratos-setup.sh -u <host username> -p \"all\" [-s]" echo "Example:" echo "sudo ./setup.sh -p \"all\"" echo "" echo "-u: <host username> The login user of the host." + echo "-s: Start servers after installation." echo "" } -while getopts u:p:g: opts +while getopts u:p:g:s opts do case $opts in p) @@ -60,6 +62,9 @@ do g) enable_internal_git=${OPTARG} ;; + s) + auto_start_servers="true" + ;; \?) help exit 1 @@ -625,9 +630,11 @@ chown $host_user:$host_user $stratos_path -R echo "Apache Stratos setup has successfully completed" -read -p "Do you want to start the servers [y/n]? " answer -if [[ $answer != y ]] ; then - exit 1 +if [[ $auto_start_servers != "true" ]]; then + read -p "Do you want to start the servers [y/n]? " answer + if [[ $answer != y ]] ; then + exit 1 + fi fi echo "Starting the servers" >> $LOG
