This commit is contained in:
Derek Macias
2016-01-10 04:13:58 -07:00
parent 2e703ce91e
commit c37a622c1c
4 changed files with 10 additions and 10 deletions

View File

@ -2,7 +2,7 @@
require_once("/usr/local/emhttp/plugins/NerdPack/include/NerdPackHelpers.php");
$plg_path ="/boot/config/plugins/NerdPack";// plugin path
$pkg_path = "$plg_path/packages"; // package path
$pkg_path = "$plg_path/packages/"; // package path
$config_file = "$plg_path/NerdPack.cfg";// config file
$pkg_cfg = (is_file($config_file)) ? parse_ini_file($config_file) : array(); // get package configs
@ -11,10 +11,10 @@ $pkgs_downloaded = array_diff( scandir($pkg_path, 1), array(".", "..") ); // get
$pkgs_installed = array_diff( scandir("/var/log/packages", 1), array(".", "..") ); // get array of all installed packages
$pkgs_desc_file = file_get_contents("$pkg_path/packages-desc");// get package descriptions
$pkgs_desc_file = file_get_contents($pkg_path."packages-desc");// get package descriptions
$pkgs_desc_array = json_decode($pkgs_desc_file, true);
$pkgs_github_file = file_get_contents("$pkg_path/packages.json");// get packages
$pkgs_github_file = file_get_contents($pkg_path."packages.json");// get packages
$pkgs_github_array = json_decode($pkgs_github_file, true);
$pkgs_array = array();

View File

@ -55,9 +55,9 @@ function logger($output, $quiet) {
usleep(100000);
}
$config_file = "/boot/config/plugins/NerdPack/NerdPack.cfg";
$pkg_path ="/boot/config/plugins/NerdPack/packages/";
$plg_path ="/boot/config/plugins/NerdPack";// plugin path
$pkg_path = "$plg_path/packages/"; // package path
$config_file = "$plg_path/NerdPack.cfg";// config file
$pkg_cfg = (is_file($config_file)) ? parse_ini_file($config_file) : array(); // get package configs
@ -65,7 +65,7 @@ $pkgs_downloaded = array_diff( scandir($pkg_path, 1), array(".", "..") ); // get
$pkgs_installed = array_diff( scandir("/var/log/packages", 1), array(".", "..") );
$pkgs_json = "/boot/config/plugins/NerdPack/packages.json";
$pkgs_json = $pkg_path."packages.json";
$pkgs_file = (is_file($pkgs_json)) ? file_get_contents($pkgs_json) : array();
$pkgs_github = json_decode($pkgs_file, true);