mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-30 23:33:34 +00:00 
			
		
		
		
	Fix powerdns dns plugin install, deps are outrageously old ;(
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Close stale issues and PRs / stale (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Close stale issues and PRs / stale (push) Has been cancelled
				
			This commit is contained in:
		| @@ -11,7 +11,7 @@ const certbot = { | ||||
| 	/** | ||||
| 	 * @param {array} pluginKeys | ||||
| 	 */ | ||||
| 	installPlugins: async function (pluginKeys) { | ||||
| 	installPlugins: async (pluginKeys) => { | ||||
| 		let hasErrors = false; | ||||
|  | ||||
| 		return new Promise((resolve, reject) => { | ||||
| @@ -21,7 +21,7 @@ const certbot = { | ||||
| 			} | ||||
|  | ||||
| 			batchflow(pluginKeys).sequential() | ||||
| 				.each((i, pluginKey, next) => { | ||||
| 				.each((_i, pluginKey, next) => { | ||||
| 					certbot.installPlugin(pluginKey) | ||||
| 						.then(() => { | ||||
| 							next(); | ||||
| @@ -51,7 +51,7 @@ const certbot = { | ||||
| 	 * @param   {string}  pluginKey | ||||
| 	 * @returns {Object} | ||||
| 	 */ | ||||
| 	installPlugin: async function (pluginKey) { | ||||
| 	installPlugin: async (pluginKey) => { | ||||
| 		if (typeof dnsPlugins[pluginKey] === 'undefined') { | ||||
| 			// throw Error(`Certbot plugin ${pluginKey} not found`); | ||||
| 			throw new error.ItemNotFoundError(pluginKey); | ||||
| @@ -63,8 +63,14 @@ const certbot = { | ||||
| 		plugin.version      = plugin.version.replace(/{{certbot-version}}/g, CERTBOT_VERSION_REPLACEMENT); | ||||
| 		plugin.dependencies = plugin.dependencies.replace(/{{certbot-version}}/g, CERTBOT_VERSION_REPLACEMENT); | ||||
|  | ||||
| 		const cmd = '. /opt/certbot/bin/activate && pip install --no-cache-dir ' + plugin.dependencies + ' ' + plugin.package_name + plugin.version + ' ' + ' && deactivate'; | ||||
| 		return utils.exec(cmd) | ||||
| 		const opts = {}; | ||||
| 		if (typeof plugin.env === 'object') { | ||||
| 			// include process.env in opts | ||||
| 			opts.env = Object.assign({}, process.env, plugin.env); | ||||
| 		} | ||||
|  | ||||
| 		const cmd = `. /opt/certbot/bin/activate && pip install --no-cache-dir ${plugin.dependencies} ${plugin.package_name}${plugin.version}  && deactivate`; | ||||
| 		return utils.exec(cmd, opts) | ||||
| 			.then((result) => { | ||||
| 				logger.complete(`Installed ${pluginKey}`); | ||||
| 				return result; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user