public ActionResult RemoveWebServerCertificate([FromServices] ISafeguardLogic safeguard, [FromQuery] bool restart = true) { safeguard.RemoveWebServerCertificate(); if (restart) { safeguard.RestartService(); } return(NoContent()); }
public ActionResult InstallWebServerCertificate([FromServices] ISafeguardLogic safeguard, [FromBody] CertificateInfo certInfo, [FromQuery] bool restart = true) { safeguard.InstallCertificate(certInfo, CertificateType.WebSsl); var certificate = safeguard.GetCertificateInfo(CertificateType.WebSsl); if (restart) { safeguard.RestartService(); } return(Ok(certificate)); }
public void RestartService() { _safeguardLogic.RestartService(); }
public ActionResult RestartService([FromServices] ISafeguardLogic safeguard) { safeguard.RestartService(); return(NoContent()); }