You've already forked nginx-proxy-manager
							
							
				mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-30 18:05:34 +03:00 
			
		
		
		
	404 hosts add update complete, fix certbot renewals
and remove the need for email and agreement on cert requests
This commit is contained in:
		| @@ -6,46 +6,6 @@ import utils from "./utils.js"; | ||||
|  | ||||
| const CERTBOT_VERSION_REPLACEMENT = "$(certbot --version | grep -Eo '[0-9](\\.[0-9]+)+')"; | ||||
|  | ||||
| /** | ||||
|  * @param {array} pluginKeys | ||||
|  */ | ||||
| const installPlugins = async (pluginKeys) => { | ||||
| 	let hasErrors = false; | ||||
|  | ||||
| 	return new Promise((resolve, reject) => { | ||||
| 		if (pluginKeys.length === 0) { | ||||
| 			resolve(); | ||||
| 			return; | ||||
| 		} | ||||
|  | ||||
| 		batchflow(pluginKeys) | ||||
| 			.sequential() | ||||
| 			.each((_i, pluginKey, next) => { | ||||
| 				certbot | ||||
| 					.installPlugin(pluginKey) | ||||
| 					.then(() => { | ||||
| 						next(); | ||||
| 					}) | ||||
| 					.catch((err) => { | ||||
| 						hasErrors = true; | ||||
| 						next(err); | ||||
| 					}); | ||||
| 			}) | ||||
| 			.error((err) => { | ||||
| 				logger.error(err.message); | ||||
| 			}) | ||||
| 			.end(() => { | ||||
| 				if (hasErrors) { | ||||
| 					reject( | ||||
| 						new errs.CommandError("Some plugins failed to install. Please check the logs above", 1), | ||||
| 					); | ||||
| 				} else { | ||||
| 					resolve(); | ||||
| 				} | ||||
| 			}); | ||||
| 	}); | ||||
| }; | ||||
|  | ||||
| /** | ||||
|  * Installs a cerbot plugin given the key for the object from | ||||
|  * ../global/certbot-dns-plugins.json | ||||
| @@ -84,4 +44,43 @@ const installPlugin = async (pluginKey) => { | ||||
| 		}); | ||||
| }; | ||||
|  | ||||
| /** | ||||
|  * @param {array} pluginKeys | ||||
|  */ | ||||
| const installPlugins = async (pluginKeys) => { | ||||
| 	let hasErrors = false; | ||||
|  | ||||
| 	return new Promise((resolve, reject) => { | ||||
| 		if (pluginKeys.length === 0) { | ||||
| 			resolve(); | ||||
| 			return; | ||||
| 		} | ||||
|  | ||||
| 		batchflow(pluginKeys) | ||||
| 			.sequential() | ||||
| 			.each((_i, pluginKey, next) => { | ||||
| 				installPlugin(pluginKey) | ||||
| 					.then(() => { | ||||
| 						next(); | ||||
| 					}) | ||||
| 					.catch((err) => { | ||||
| 						hasErrors = true; | ||||
| 						next(err); | ||||
| 					}); | ||||
| 			}) | ||||
| 			.error((err) => { | ||||
| 				logger.error(err.message); | ||||
| 			}) | ||||
| 			.end(() => { | ||||
| 				if (hasErrors) { | ||||
| 					reject( | ||||
| 						new errs.CommandError("Some plugins failed to install. Please check the logs above", 1), | ||||
| 					); | ||||
| 				} else { | ||||
| 					resolve(); | ||||
| 				} | ||||
| 			}); | ||||
| 	}); | ||||
| }; | ||||
|  | ||||
| export { installPlugins, installPlugin }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user