mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 11:19:25 -05:00
Added "safe mode" option selection
This commit is contained in:
@@ -75,12 +75,15 @@ $(document).ajaxSend(function(elm, xhr, s){
|
||||
</script>
|
||||
</head>
|
||||
<?
|
||||
$safemode = '/boot/unraidsafemode';
|
||||
switch ($_POST['cmd']) {
|
||||
case 'reboot':
|
||||
if (isset($_POST['safemode'])) touch($safemode); else @unlink($safemode);
|
||||
exec('/sbin/reboot');?>
|
||||
<body onload="reboot_online()"><div class='notice'></div></body>
|
||||
<? break;
|
||||
case 'shutdown':
|
||||
if (isset($_POST['safemode'])) touch($safemode); else @unlink($safemode);
|
||||
exec('/sbin/poweroff');?>
|
||||
<body onload="shutdown_online()"><div class='notice'></div></body>
|
||||
<? break;
|
||||
|
||||
Reference in New Issue
Block a user