Added "safe mode" option selection

This commit is contained in:
bergware
2020-04-09 11:56:37 +02:00
parent 0bf743af1c
commit 19de45242a
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -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;