Changeset - a185042de98a
[Not reviewed]
default
0 3 0
Mads Kiilerich - 6 years ago 2019-06-30 13:31:56
mads@kiilerich.com
kallithea-cli: set kallithea_cli_path when creating .ini file so it doesn't have to be set manually before using ssh
3 files changed with 14 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/bin/kallithea_cli_base.py
Show inline comments
 
@@ -15,12 +15,22 @@
 
import click
 
import functools
 
import os
 
import sys
 

	
 
import kallithea
 
import logging.config
 
import paste.deploy
 

	
 

	
 
# kallithea_cli is usually invoked through the 'kallithea-cli' wrapper script
 
# that is installed by setuptools, as specified in setup.py console_scripts
 
# entry_points. The script will be using the right virtualenv (if any), and for
 
# Unix, it will contain #! pointing at the right python executable. The script
 
# also makes sure sys.argv[0] points back at the script path, and that is what
 
# can be used to invoke 'kallithea-cli' later.
 
kallithea_cli_path = sys.argv[0]
 

	
 

	
 
# This placeholder is the main entry point for the kallithea-cli command
 
@click.group(context_settings=dict(help_option_names=['-h', '--help']))
 
def cli():
kallithea/bin/kallithea_cli_config.py
Show inline comments
 
@@ -63,6 +63,7 @@ def config_create(config_file, key_value
 
    mako_variable_values = {
 
        'git_hook_interpreter': sys.executable,
 
        'user_home_path': os.path.expanduser('~'),
 
        'kallithea_cli_path': cli_base.kallithea_cli_path,
 
    }
 
    ini_settings = defaultdict(dict)
 

	
kallithea/lib/paster_commands/template.ini.mako
Show inline comments
 
@@ -337,6 +337,9 @@ ssh_authorized_keys = ${user_home_path}/
 

	
 
<%text>## Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve.</%text>
 
#kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli
 
%if kallithea_cli_path:
 
kallithea_cli_path = ${kallithea_cli_path}
 
%endif
 

	
 
<%text>####################################</%text>
 
<%text>###        CELERY CONFIG        ####</%text>
0 comments (0 inline, 0 general)