Add Custom PIP URL
This commit is contained in:
parent
aa08c440b9
commit
38e86afc56
2 changed files with 4 additions and 2 deletions
|
@ -17,6 +17,7 @@ const certbotCommand = 'certbot';
|
||||||
const archiver = require('archiver');
|
const archiver = require('archiver');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { isArray } = require('lodash');
|
const { isArray } = require('lodash');
|
||||||
|
const PIP_URL = process.env.PIP_URL !== '' ? process.env.PIP_URL : 'https://www.piwheels.org/simple';
|
||||||
|
|
||||||
function omissions() {
|
function omissions() {
|
||||||
return ['is_deleted'];
|
return ['is_deleted'];
|
||||||
|
@ -878,7 +879,7 @@ const internalCertificate = {
|
||||||
|
|
||||||
// Special case for cloudflare
|
// Special case for cloudflare
|
||||||
if (dns_plugin.package_name === 'certbot-dns-cloudflare') {
|
if (dns_plugin.package_name === 'certbot-dns-cloudflare') {
|
||||||
prepareCmd = 'pip install certbot-dns-cloudflare --index-url https://www.piwheels.org/simple --prefer-binary';
|
prepareCmd = 'pip install certbot-dns-cloudflare --prefer-binary --index-url ' + PIP_URL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Whether the plugin has a --<name>-credentials argument
|
// Whether the plugin has a --<name>-credentials argument
|
||||||
|
|
|
@ -10,6 +10,7 @@ const authModel = require('./models/auth');
|
||||||
const settingModel = require('./models/setting');
|
const settingModel = require('./models/setting');
|
||||||
const dns_plugins = require('./global/certbot-dns-plugins');
|
const dns_plugins = require('./global/certbot-dns-plugins');
|
||||||
const debug_mode = process.env.NODE_ENV !== 'production' || !!process.env.DEBUG;
|
const debug_mode = process.env.NODE_ENV !== 'production' || !!process.env.DEBUG;
|
||||||
|
const PIP_URL = process.env.PIP_URL !== '' ? process.env.PIP_URL : 'https://www.piwheels.org/simple';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new JWT RSA Keypair if not alread set on the config
|
* Creates a new JWT RSA Keypair if not alread set on the config
|
||||||
|
@ -199,7 +200,7 @@ const setupCertbotPlugins = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (install_cloudflare_plugin) {
|
if (install_cloudflare_plugin) {
|
||||||
promises.push(utils.exec('pip install certbot-dns-cloudflare --index-url https://www.piwheels.org/simple --prefer-binary'));
|
promises.push(utils.exec('pip install certbot-dns-cloudflare --prefer-binary --index-url ' + PIP_URL));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (promises.length) {
|
if (promises.length) {
|
||||||
|
|
Loading…
Reference in a new issue