mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 18:48:49 -05:00
Delete non-used file
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
<?PHP
|
||||
/* Copyright 2005-2017, Lime Technology
|
||||
* Copyright 2012-2017, Bergware International.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
function preset($disk) {
|
||||
return strpos($_POST['preset'],$disk['type'])!==false && strpos($disk['status'],'_NP')===false;
|
||||
}
|
||||
|
||||
@unlink('/boot/config/smart-one.cfg');
|
||||
@unlink('/boot/config/smart-all.cfg');
|
||||
@unlink('/boot/config/plugins/dynamix/monitor.ini');
|
||||
if ($_POST['preset']) {
|
||||
$disks = parse_ini_file('/var/local/emhttp/disks.ini',true);
|
||||
$disks = array_filter($disks,'preset');
|
||||
$text = '';
|
||||
foreach ($disks as $disk => $block) {
|
||||
$text .= "[$disk]\n";
|
||||
foreach ($block as $key => $value) $text .= "$key=\"$value\"\n";
|
||||
}
|
||||
file_put_contents('/var/tmp/disks.ini',$text);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user