mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
This reverts commit 0a3e973d99.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
<?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 p0f extends Module
|
||||
{
|
||||
public function route()
|
||||
@@ -47,9 +50,9 @@ class p0f extends Module
|
||||
}
|
||||
}
|
||||
|
||||
protected function checkDeps($dependencyName)
|
||||
protected function checkDependency($dependencyName)
|
||||
{
|
||||
return ($this->checkDependency($dependencyName) && ($this->uciGet("p0f.module.installed")));
|
||||
return ((exec("which {$dependencyName}") == '' ? false : true) && ($this->uciGet("p0f.module.installed")));
|
||||
}
|
||||
|
||||
protected function getDevice()
|
||||
@@ -65,7 +68,7 @@ class p0f extends Module
|
||||
|
||||
private function handleDependencies()
|
||||
{
|
||||
if (!$this->checkDeps("p0f")) {
|
||||
if (!$this->checkDependency("p0f")) {
|
||||
$this->execBackground("/pineapple/modules/p0f/scripts/dependencies.sh install ".$this->request->destination);
|
||||
$this->response = array('success' => true);
|
||||
} else {
|
||||
@@ -117,7 +120,7 @@ class p0f extends Module
|
||||
private function refreshStatus()
|
||||
{
|
||||
if (!file_exists('/tmp/p0f.progress')) {
|
||||
if (!$this->checkDeps("p0f")) {
|
||||
if (!$this->checkDependency("p0f")) {
|
||||
$installed = false;
|
||||
$install = "Not installed";
|
||||
$installLabel = "danger";
|
||||
@@ -172,7 +175,7 @@ class p0f extends Module
|
||||
|
||||
private function refreshOutput()
|
||||
{
|
||||
if ($this->checkDeps("p0f")) {
|
||||
if ($this->checkDependency("p0f")) {
|
||||
if ($this->checkRunning("p0f")) {
|
||||
$path = "/pineapple/modules/p0f/log";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user