Disable/Renable nginx tweaks to placate certbot.
This commit is contained in:
parent
7bad35f412
commit
5b69c46146
1 changed files with 15 additions and 0 deletions
|
|
@ -883,7 +883,16 @@ class Bouncer
|
|||
}
|
||||
}
|
||||
|
||||
// Start running shell commands...
|
||||
$shell = new Exec();
|
||||
|
||||
// Disable nginx tweaks
|
||||
$disableNginxTweaksCommand = (new CommandBuilder("mv"))
|
||||
->addArgument("/etc/nginx/conf.d/tweak.conf")
|
||||
->addArgument("/etc/nginx/conf.d/tweak.disabled");
|
||||
$shell->run($disableNginxTweaksCommand);
|
||||
|
||||
// Generate letsencrypt cert
|
||||
$command = new CommandBuilder('/usr/bin/certbot');
|
||||
$command->addSubCommand('certonly');
|
||||
$command->addArgument('nginx');
|
||||
|
|
@ -903,6 +912,12 @@ class Bouncer
|
|||
$this->logger->critical(sprintf('%s Generating failed!', Emoji::CHARACTER_WARNING));
|
||||
}
|
||||
|
||||
// Re-enable nginx tweaks
|
||||
$disableNginxTweaksCommand = (new CommandBuilder("mv"))
|
||||
->addArgument("/etc/nginx/conf.d/tweak.disabled")
|
||||
->addArgument("/etc/nginx/conf.d/tweak.conf");
|
||||
$shell->run($disableNginxTweaksCommand);
|
||||
|
||||
$target->setUseTemporaryCert(false);
|
||||
$this->generateNginxConfig($target);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue