diff --git a/src/usr/share/alternc/panel/class/m_acme.php b/src/usr/share/alternc/panel/class/m_acme.php index e3cc659..ac5ad8a 100644 --- a/src/usr/share/alternc/panel/class/m_acme.php +++ b/src/usr/share/alternc/panel/class/m_acme.php @@ -47,14 +47,18 @@ public function m_acme() * @return integer the ID of the newly created certificate in the table * or false if an error occurred */ - public function import($fqdn) + public function import($fqdn,$force = false) { global $cuid, $msg, $ssl; $msg->log("acme", "import","$fqdn"); $output = array(); $return_var = -1; - exec("certbot --agree-tos --non-interactive --webroot -w /var/lib/acme/ certonly -d ".$fqdn." 2>&1", $output, $return_var); + $arg = "--agree-tos --non-interactive --webroot -w /var/lib/acme/"; + if ($force) { + $arg.=" --force-renewal"; + } + exec("certbot ".$arg." certonly -d ".$fqdn." 2>&1", $output, $return_var); // Add certificate to panel if ($return_var == 0) {