@@ -139,16 +142,18 @@ function enable_privacy(status) {
...
@@ -139,16 +142,18 @@ function enable_privacy(status) {
functionconfirm_reboot(){
functionconfirm_reboot(){
show_modal_confirm(
show_modal_confirm(
"Reboot server",
"Reboot",
$("<p>This will reboot your server, until the server is fully restarted your users will not be able to send and receive email. The reboot can't be cancelled</p>"),
$("<p>This will reboot your Mail-in-a-Box <code>{{hostname}}</code>.</p> <p>Until the machine is fully restarted, your users will not be able to send and receive email, and you will not be able to connect to this control panel or with SSH. The reboot cannot be cancelled.</p>"),
"Reboot now",
"Reboot Now",
function(){
function(){
api(
api(
"/system/reboot",
"/system/reboot",
"POST",
"POST",
{},
{},
function(r){
function(r){
show_modal_error("Reboot","Please refresh the page after a minute or so."+r);
varmsg="<p>Please reload this page after a minute or so.</p>";
if(r)msg="<p>The reboot command said:</p> <pre>"+$("<pre/>").text(r).html()+"</pre>";// successful reboots don't produce any output; the output must be HTML-escaped