diff options
author | Milo Casagrande <milo@ubuntu.com> | 2013-01-23 13:48:47 +0100 |
---|---|---|
committer | Milo Casagrande <milo@ubuntu.com> | 2013-01-23 13:48:47 +0100 |
commit | a9a0ee1e1d264f6cd460418502822d9fe81a1053 (patch) | |
tree | f0ab8e0e08969697bf432905ef2501d1773c32e7 /scripts/rhodecode-setup | |
parent | 3b01ea62c736b4432fcd7306a5aeb0f852fe9377 (diff) |
Fixed directories path.
Diffstat (limited to 'scripts/rhodecode-setup')
-rw-r--r-- | scripts/rhodecode-setup | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/scripts/rhodecode-setup b/scripts/rhodecode-setup index c24c963..afdb097 100644 --- a/scripts/rhodecode-setup +++ b/scripts/rhodecode-setup @@ -63,8 +63,10 @@ POSTGRES_ROLE = "rhodecode" # Default directory where to store git repositories. REPOS_DIR = "/opt/git_repos" -# Default Celery log directory +# Default Celery log directory. CELERY_LOG_DIR = "/var/log/celery" +# Default RhodeCode log directory. +RHODECODE_LOG_DIR = "/var/log/rhodecode" def cli_args(): @@ -78,6 +80,10 @@ def cli_args(): help="The directory where to store RhodeCode data " "and cache. Defaults to '%s'." % RHODECODE_DATA_DIR) + parser.add_argument("--rhodecode-log-dir", + default=RHODECODE_LOG_DIR, + help="The directory to store RhodeCode logs. Defaults " + "to '%s'." % RHODECODE_LOG_DIR) parser.add_argument("--rhodecode-admin-usr", default=RHODECODE_ADMIN_USER, help="The name of the admin user for RhodeCode.") @@ -130,7 +136,8 @@ def cli_args(): "Defaults to '%s'." % RABBITMQ_DEFAULT_VHOST) parser.add_argument("--dbname", default=DB_NAME, - help="The name to use for the database.") + help="The name to use for the database. Defauls to " + "'%s'." % DB_NAME) parser.add_argument("--repos-dir", default=REPOS_DIR, help="Where the git repositories will be stored. " @@ -482,10 +489,7 @@ def install_upstart_conf(no_celery): def copy_file(source, dest): - """Copies the config file to the destination directory. - - Copies RhodeCode destination file to the specified directory, setting the - corret user and group for the copied file. + """Copies the a file to the defined destination. :param source: Path to the file to copy. :param dest: Where to copy the source file. @@ -532,6 +536,7 @@ def print_install_report(args, home_dir, config_file): print "\tRabbitMQ Password: %s" % args.rabbitmq_pwd print "\tRabbitMQ Vhost: %s" % args.rabbitmq_vhost + if __name__ == '__main__': args = cli_args() check_cli_args(args) @@ -541,7 +546,8 @@ if __name__ == '__main__': setup_user(args.rhodecode_usr, home_dir, args.rhodecode_usr) # Create the necessary directories to store RhodeCode data and cache. - directories = [args.rhodecode_data_dir, args.repos_dir] + directories = [args.rhodecode_data_dir, args.repos_dir, + args.rhodedoce_log_dir] if not args.no_celery: directories.append(args.celery_log_dir) |