Skip to content

Commit

Permalink
nasmon now uses stardust process manager
Browse files Browse the repository at this point in the history
  • Loading branch information
nightflyza committed Jan 19, 2023
1 parent 129ca61 commit 5eb970a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.4 rev 8781
1.3.4 rev 8782
15 changes: 11 additions & 4 deletions modules/remoteapi/nasmon.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
<?php

//NAS monitoring periodic polling
if ($_GET['action'] == 'nasmon') {
if (ubRouting::get('action') == 'nasmon') {
if ($alterconf['NASMON_ENABLED']) {
$nasMon = new NasMon();
$nasMon->saveCheckResults();
die('OK: NASMON');
$nasMonProcess = new StarDust('NASMON');
if ($nasMonProcess->notRunning()) {
$nasMonProcess->start();
$nasMon = new NasMon();
$nasMon->saveCheckResults();
$nasMonProcess->stop();
die('OK: NASMON');
} else {
die('SKIP:NASMON_ALREADY_RUNNING');
}
} else {
die('ERROR: NASMON DISABLED');
}
Expand Down

0 comments on commit 5eb970a

Please sign in to comment.