wcsinstd: add settings for wcsctl script location

This commit is contained in:
Frédéric Péters 2013-06-12 22:28:15 +02:00
parent a3e9f63e34
commit a8eed2cfbc
3 changed files with 4 additions and 1 deletions

View File

@ -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:

View File

@ -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')

View File

@ -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