diff options
author | Milo Casagrande <milo@ubuntu.com> | 2013-01-24 13:35:52 +0100 |
---|---|---|
committer | Milo Casagrande <milo@ubuntu.com> | 2013-01-24 13:35:52 +0100 |
commit | c33e492f38f8da6b1e23b8a943c7c6f5b2cf2c7d (patch) | |
tree | 64dc551e9a6c49aa9b6a58ab5e5d6246b17ed965 | |
parent | e8d9d98b010f14eb2a9bf20b501cb724abec661c (diff) |
Added input string for rhodecode setup.
-rw-r--r-- | config/rhodecode | 2 | ||||
-rw-r--r-- | scripts/rhodecode-setup | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/config/rhodecode b/config/rhodecode index e7a216e..852d5f2 100644 --- a/config/rhodecode +++ b/config/rhodecode @@ -10,12 +10,10 @@ Alias /git-ro/ /opt/git_repos/ Alias / /opt/git_repos/ - #important ! #Directive to properly generate url (clone url) for pylons ProxyPreserveHost On #rhodecode instance ProxyPass / http://127.0.0.1:5000/ ProxyPassReverse / http://127.0.0.1:5000/ - </VirtualHost> diff --git a/scripts/rhodecode-setup b/scripts/rhodecode-setup index 67ef718..e193f54 100644 --- a/scripts/rhodecode-setup +++ b/scripts/rhodecode-setup @@ -456,7 +456,7 @@ def install_rhodecode(work_dir, user=None): def setup_rhodecode(rhodecode_dir, config_file, git_repos, admin_usr, - admin_pwd, admin_email, user=None): + admin_pwd, admin_email, user=None, assume_yes=False): """Sets up RhodeCode instance. :param rhodecode_dir: The directory where RhodeCode code was checked out. @@ -471,6 +471,8 @@ def setup_rhodecode(rhodecode_dir, config_file, git_repos, admin_usr, :type str :param user: The user to run the process as. :type str + :param assume_yes: Tries to automate the process. + :type bool """ usr_arg = "--user=%s" % admin_usr pwd_arg = "--password=%s" % admin_pwd @@ -486,7 +488,10 @@ def setup_rhodecode(rhodecode_dir, config_file, git_repos, admin_usr, cmd_args.append(email_arg) cmd_args.append(repos) - execute_command(cmd_args, work_dir=rhodecode_dir) + input_str = None + if assume_yes: + input_str = "y" + execute_command(cmd_args, work_dir=rhodecode_dir, input_str=input_str) def install_upstart_conf(no_celery): @@ -679,7 +684,8 @@ if __name__ == '__main__': args.rhodecode_admin_usr, args.rhodecode_admin_pwd, args.rhodecode_admin_email, - args.rhodecode_usr) + user=args.rhodecode_usr, + assume_yes=args.assume_yes) # Apache configurations. apache_conf = os.path.abspath(args.apache_conf) |