diff options
author | Stevan Radaković <stevan.radakovic@linaro.org> | 2013-01-28 16:09:51 +0100 |
---|---|---|
committer | Stevan Radaković <stevan.radakovic@linaro.org> | 2013-01-28 16:09:51 +0100 |
commit | 28bd549ea71b415bcfb3b68c2fdc56a54399f6ef (patch) | |
tree | 41eadc782b954f58acc4666066717c57b4c5ec68 /scripts/rhodecode-setup | |
parent | 0396791e7c8d68f1edc5e5ee07d5d5dbdeb48768 (diff) |
Remove requirements in option settings, move them to the check_cli_args method.
Diffstat (limited to 'scripts/rhodecode-setup')
-rwxr-xr-x | scripts/rhodecode-setup | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/scripts/rhodecode-setup b/scripts/rhodecode-setup index 0b0fefc..2d72fd6 100755 --- a/scripts/rhodecode-setup +++ b/scripts/rhodecode-setup @@ -95,8 +95,7 @@ def cli_args(): default=RHODECODE_ADMIN_USER, help="The name of the admin user for RhodeCode.") parser.add_argument("--rhodecode-admin-pwd", - help="The password for RhodeCode admin user.", - required=True) + help="The password for RhodeCode admin user.") parser.add_argument("--rhodecode-admin-email", required=True, help="The email address for RhodeCode admin user.") @@ -135,8 +134,7 @@ def cli_args(): help="The name to use for the RabbitMQ session. " "Defaults to '%s'." % RABBITMQ_DEFAULT_USER) parser.add_argument("--rabbitmq-pwd", - help="The password for the RabbitMQ user.", - required=True) + help="The password for the RabbitMQ user.") parser.add_argument("--rabbitmq-vhost", default=RABBITMQ_DEFAULT_VHOST, help="The name of the RabbitMQ vhost for the user. " @@ -154,13 +152,11 @@ def cli_args(): help="The PostgreSQL role to create. Defaults " "to '%s'." % POSTGRES_ROLE) parser.add_argument("--postgres-role-pwd", - required=True, help="The password for the PostgreSQL role.") parser.add_argument("--update", action="store_true", help="Updates to the latest tagged version.") parser.add_argument("--apache-conf", - required=True, help="Path to the Apache RhodeCode configuration.") parser.add_argument("--apache-website-dir", default=APACHE_DEFAULT_DIR, @@ -200,6 +196,22 @@ def check_cli_args(args): print ("It is necessary to specify the administration " "password for RhodeCode") sys.exit(1) + if not args.rhodecode_admin_email: + print ("It is necessary to specify the administration " + "email for RhodeCode") + sys.exit(1) + if not args.apache_conf: + print ("It is necessary to specify the path to apache " + "configuration file") + sys.exit(1) + if not args.postgres_role_pwd: + print ("It is necessary to specify the PostgreSQL " + "user password") + sys.exit(1) + if not args.rabbitmq_pwd: + print ("It is necessary to specify the RabbitMQ " + "password") + sys.exit(1) if not args.no_celery: if (args.rabbitmq_usr == RABBITMQ_DEFAULT_USER or \ |