Skip to content

Commit

Permalink
Fix status display if not running
Browse files Browse the repository at this point in the history
  • Loading branch information
Squidly271 committed Mar 12, 2017
1 parent db34f27 commit 1b7ad87
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
Binary file added archive/ca.turbo-2017.03.11b-x86_64-1.txz
Binary file not shown.
4 changes: 2 additions & 2 deletions plugins/ca.turbo.plg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "ca.turbo">
<!ENTITY author "Andrew Zawadzki">
<!ENTITY version "2017.03.11a">
<!ENTITY md5 "d18e3c26411416e3300792a4c80c9611">
<!ENTITY version "2017.03.11b">
<!ENTITY md5 "aec161843417bd9bdee82b25d923c21f">
<!ENTITY launch "Settings/Turbo">
<!ENTITY plugdir "/usr/local/emhttp/plugins/&name;">
<!ENTITY github "Squidly271/ca.turbo">
Expand Down
7 changes: 4 additions & 3 deletions source/ca.turbo/usr/local/emhttp/plugins/ca.turbo/Turbo.page
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ function myAlert(description,textdescription,textimage,imagesize, outsideClick,
</script>

<span id='update' hidden><font color='red'>An update to this plugin is available</font><br><br></span>
<strong>CA Auto Turbo Mode will enable / disable <em>Turbo Write Mode (reconstruct write)</em> based upon the number of hard drives currently spun down. For a good explanation of turbo write mode, see <a href='https://forums.lime-technology.com/topic/50397-turbo-write/#comment-496144'>HERE</a><br></strong>

> Note that certain hardware combinations may actually result in lower speeds when utilizing Turbo (read / reconstruct) mode
> Note that certain hardware combinations may actually result in lower speeds when utilizing Turbo (reconstruct) mode

<dl>
<dt>Enable Automatic Turbo Mode:</dt>
Expand Down Expand Up @@ -181,10 +182,10 @@ function myAlert(description,textdescription,textimage,imagesize, outsideClick,
<dl>
<dt>Data Drives Spun Down:</dt>
<dd><span id='spunDown'><font color='red'>Script Not Running</font></span></dd>
<dt>Turbo Mode Enabled:</dt>
<dt>Write Mode:</dt>
<dd><span id='turboOn'><font color='red'>Script Not Running</font></span></dd>
</dl>
<span id='miscScript'></span>

<center><b>For support for this plugin, visit <a href='https://forums.lime-technology.com/topic/55671-plugin-ca-auto-turbo-write-mode/'>HERE</a></center>
<a href="Settings/caHelp" target='_blank'>CA Manual</a><a style='float:right;cursor:pointer' onclick='showCredits();'>Credits</a><br><br></span>
<a style='float:right;cursor:pointer' onclick='showCredits();'>Credits</a><br><br></span>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require_once("/usr/local/emhttp/plugins/ca.turbo/include/paths.php");

$settings = getPluginSettings();
if ($settings['enabled'] == "yes") {
logger("Starting CA Auto Turbo Mode");
$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
echo "Settings Updated";
break;
case 'status':
$status = readJsonFile($turboPaths['status']);
if ( is_file($turboPaths['backgroundPID']) ) {
$status = readJsonFile($turboPaths['status']);
}
if ( ! $status ) {
$unRaidVars = parse_ini_file("/var/local/emhttp/var.ini");
if ($unRaidVars['md_write_method'] == "1") {
Expand Down

0 comments on commit 1b7ad87

Please sign in to comment.