diff --git a/wcsinst/settings.py b/wcsinst/settings.py index 7fcc42f..afa262d 100644 --- a/wcsinst/settings.py +++ b/wcsinst/settings.py @@ -154,6 +154,8 @@ if WCSINSTD_URL: else: INSTALLED_APPS += ('wcsinst.wcsinstd',) +WCSINST_WCSCTL_SCRIPT = os.environ.get('WCSINST_WCSCTL_SCRIPT', 'wcsctl') + try: from local_settings import * except ImportError: diff --git a/wcsinst/wcsinstd/app_settings.py b/wcsinst/wcsinstd/app_settings.py index 8b5ebab..28de916 100644 --- a/wcsinst/wcsinstd/app_settings.py +++ b/wcsinst/wcsinstd/app_settings.py @@ -2,3 +2,4 @@ from django.conf import settings URL_TEMPLATE = getattr(settings, 'WCSINST_URL_TEMPLATE', 'https://%(domain)s') WCS_APP_DIR = getattr(settings, 'WCSINST_WCS_APP_DIR', None) +WCSCTL_SCRIPT = getattr(settings, 'WCSINST_WCSCTL_SCRIPT', 'wcsctl') diff --git a/wcsinst/wcsinstd/deploy.py b/wcsinst/wcsinstd/deploy.py index c2345c2..3d2f053 100644 --- a/wcsinst/wcsinstd/deploy.py +++ b/wcsinst/wcsinstd/deploy.py @@ -119,7 +119,7 @@ class DeployInstance(object): if wcs_cfg.get('postgresql').get(param): params.append(param) params.append(wcs_cfg.get('postgresql').get(param)) - os.system('wcsctl convertsql %s %s' % (' '.join(params), self.domain)) + os.system('%s convertsql %s %s' % (app_settings.WCSCTL_SCRIPT, ' '.join(params), self.domain)) def make_sso_config(self, wcs_cfg): has_idff = False