diff --git a/emhttp/plugins/dynamix/ArrayOperation.page b/emhttp/plugins/dynamix/ArrayOperation.page old mode 100644 new mode 100755 index 74381e295b..4f452b11fd --- a/emhttp/plugins/dynamix/ArrayOperation.page +++ b/emhttp/plugins/dynamix/ArrayOperation.page @@ -348,8 +348,40 @@ function shutdown_now(form, cmd) { $(form).append(''); switch (cmd) { - case 'reboot': var text = "_(This will reboot the system)_"; break; - case 'shutdown': var text = "_(This will shutdown the system)_"; break; + case 'reboot': + if ($('input[name="safemode"]').prop('checked')) { + $value) { + if (strpos($key, 'NGINX_TAILSCALE') !== false && $value == $_SERVER['HTTP_HOST']) { + $tailscaleUI = true; + break; + } + if (strpos($key, 'NGINX_WANFQDN') !== false && $value == $_SERVER['HTTP_HOST']) { + $connectRemote = true; + break; + } + } + ?> + var text = "_(This will reboot the server in safe mode.)_\n\n" + "_(No plugins will be loaded in safe mode.)_"; + + text += " _(If you use Tailscale or Unraid Connect Remote Access to access the webGUI or services of the server, this access will be lost.)_"; + + text += "\n\n_(You are currently accessing the webGUI of the server via Tailscale.)_"; + + + text += "\n\n_(You are currently accessing the webGUI of the server via Unraid Connect Remote Access.)_"; + + + } else { + var text = "_(This will reboot the server.)_"; + } + break; + case 'shutdown': + var text = "_(This will shutdown the server.)_"; + break; } swal({ title:"_(Proceed)_?",