diff options
-rwxr-xr-x | scripts/rhodecode-setup | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/rhodecode-setup b/scripts/rhodecode-setup index 2f6add8..9f05526 100755 --- a/scripts/rhodecode-setup +++ b/scripts/rhodecode-setup @@ -506,15 +506,21 @@ def install_rhodecode(work_dir, user=None): cmd_args.append("--user") execute_command(cmd_args, work_dir=work_dir) -def reinstall_rhodecode(work_dir): +def reinstall_rhodecode(work_dir, user=None): """Re-installs RhodeCode on the system. :param work_dir: The directory containing RhodeCode setup file. :type str """ cmd_args = ["python", "setup.py", "clean"] + if user: + cmd_args = ["-u", user, "-H"] + cmd_args + cmd_args.append("--user") execute_command(cmd_args, work_dir=work_dir, with_sudo=True) cmd_args = ["python", "setup.py", "install"] + if user: + cmd_args = ["-u", user, "-H"] + cmd_args + cmd_args.append("--user") execute_command(cmd_args, work_dir=work_dir, with_sudo=True) @@ -776,7 +782,7 @@ if __name__ == '__main__': # Update the rhodecode code base. Reinstall Rhodecode. update_rhodecode(args.rhodecode_branch, work_dir) - reinstall_rhodecode(work_dir) + reinstall_rhodecode(work_dir, args.rhodecode_usr) # Update database schema. update_database_schema(work_dir, rhodecode_conf, True) |