Module Updates for 2.6.0+ (Wave 1) (#69)

* Misc: Ignore JetBrains IDE files

* Modules: Update Modules for 2.6.0 (1)

* SiteSurvey: Actually install mdk3 dependency.
This commit is contained in:
Marc
2019-08-21 21:09:45 +01:00
committed by GitHub
parent cb24b654da
commit 0a3e973d99
68 changed files with 289 additions and 445 deletions

View File

@@ -1,8 +1,5 @@
<?php namespace pineapple;
putenv('LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH').':/sd/lib:/sd/usr/lib');
putenv('PATH='.getenv('PATH').':/sd/usr/bin:/sd/usr/sbin');
class ngrep extends Module
{
public function route()
@@ -56,9 +53,9 @@ class ngrep extends Module
}
}
protected function checkDependency($dependencyName)
protected function checkDeps($dependencyName)
{
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("ngrep.module.installed")));
return ($this->checkDependency($dependencyName) && ($this->uciGet("ngrep.module.installed")));
}
protected function getDevice()
@@ -74,7 +71,7 @@ class ngrep extends Module
private function handleDependencies()
{
if (!$this->checkDependency("ngrep")) {
if (!$this->checkDeps("ngrep")) {
$this->execBackground("/pineapple/modules/ngrep/scripts/dependencies.sh install ".$this->request->destination);
$this->response = array('success' => true);
} else {
@@ -107,7 +104,7 @@ class ngrep extends Module
private function refreshStatus()
{
if (!file_exists('/tmp/ngrep.progress')) {
if (!$this->checkDependency("ngrep")) {
if (!$this->checkDeps("ngrep")) {
$installed = false;
$install = "Not installed";
$installLabel = "danger";
@@ -147,7 +144,7 @@ class ngrep extends Module
private function refreshOutput()
{
if ($this->checkDependency("ngrep")) {
if ($this->checkDeps("ngrep")) {
if ($this->checkRunning("ngrep")) {
$path = "/pineapple/modules/ngrep/log";