mirror of
https://github.com/outbackdingo/labca.git
synced 2026-01-27 10:19:34 +00:00
Restart boulder after updating CRL generation interval
This commit is contained in:
@@ -755,6 +755,9 @@ func _crlIntervalUpdateHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if err != nil {
|
||||
res.Success = false
|
||||
res.Errors["CRLInterval"] = "Config apply error: '" + err.Error() + "'"
|
||||
} else if !_hostCommand(w, r, "boulder-restart") {
|
||||
res.Success = false
|
||||
res.Errors["CRLInterval"] = "Error restarting Boulder (ACME)"
|
||||
}
|
||||
} else {
|
||||
res.Success = false
|
||||
|
||||
@@ -705,20 +705,20 @@
|
||||
$('#modal-spinner').modal('hide');
|
||||
|
||||
if (data.Success) {
|
||||
var msg = "Successfully updated configuration.<br/>";
|
||||
var msg = "Successfully updated configuration and restarted Boulder (ACME).<br/>";
|
||||
$("#crl-interval-result").removeClass("hidden").removeClass("error").show().html(msg).addClass("success");
|
||||
|
||||
setTimeout(function() {
|
||||
window.location.reload();
|
||||
}, 2000);
|
||||
|
||||
} else {
|
||||
$("#crl-interval-result").removeClass("hidden").removeClass("success").show().text(data.Errors["CRLInterval"]).addClass("error");
|
||||
}
|
||||
})
|
||||
.fail(function(xhr, status, err) {
|
||||
$('#modal-spinner').modal('hide');
|
||||
$("#crl-interval-result").removeClass("hidden").removeClass("success").show().html(err + "<br/>").addClass("error");
|
||||
if (status == 502 || err == "Bad Gateway") {
|
||||
$("#crl-interval-result").removeClass("hidden").removeClass("error").show().html("Restarted Boulder (ACME).<br/>").addClass("success");
|
||||
} else {
|
||||
$("#crl-interval-result").removeClass("hidden").removeClass("success").show().html(err + "<br/>").addClass("error");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user