mirror of
https://github.com/crestAT/nas4free-onebuttoninstaller.git
synced 2025-12-12 09:50:26 +01:00
OBI release 0.4.1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
2
OBI.php
2
OBI.php
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
OBI.php
|
||||
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
44
onebuttoninstaller/apps/htop-start.php
Normal file
44
onebuttoninstaller/apps/htop-start.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/*
|
||||
htop-start.php
|
||||
|
||||
Copyright (c) 2018 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
require_once("config.inc");
|
||||
require_once("/usr/local/www/ext/onebuttoninstaller/extension-lib.inc");
|
||||
$rootfolder = dirname(__FILE__);
|
||||
|
||||
$return_val = 0;
|
||||
|
||||
$pkgName = "htop";
|
||||
$pkgFileNameNeeded = $pkgName;
|
||||
$manifest = ext_load_package($pkgName, $pkgFileNameNeeded, $rootfolder);
|
||||
$return_val += mwexec("mkdir -p /usr/local/share/pixmaps", true);
|
||||
$return_val += mwexec("ln -sf '{$rootfolder}/bin/{$pkgName}/usr/local/bin/htop' /usr/local/bin", true);
|
||||
$return_val += mwexec("ln -sf '{$rootfolder}/bin/{$pkgName}/usr/local/share/pixmaps/htop.png' /usr/local/share/pixmaps", true);
|
||||
|
||||
if ($return_val == 0) mwexec("logger {$pkgName}-extension: started successfully");
|
||||
else mwexec("logger {$pkgName}-extension: error(s) during startup, failed with return value = {$return_val}");
|
||||
echo "RETVAL = {$return_val}\n";
|
||||
?>
|
||||
70
onebuttoninstaller/apps/htop.postinit
Normal file
70
onebuttoninstaller/apps/htop.postinit
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/*
|
||||
universal postinit file for CLI extensions
|
||||
|
||||
Copyright (c) 2015 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
require_once("config.inc");
|
||||
|
||||
$appName = "Htop";
|
||||
$command = "htop-start.php";
|
||||
$cmd = dirname(__FILE__)."/{$command}";
|
||||
|
||||
// remove start/stop commands
|
||||
// remove existing old rc format entries
|
||||
if (is_array($config['rc']) && is_array($config['rc']['postinit']) && is_array( $config['rc']['postinit']['cmd'])) {
|
||||
$rc_param_count = count($config['rc']['postinit']['cmd']);
|
||||
for ($i = 0; $i < $rc_param_count; $i++) {
|
||||
if (preg_match("/{$command}/", $config['rc']['postinit']['cmd'][$i])) unset($config['rc']['postinit']['cmd'][$i]);
|
||||
}
|
||||
}
|
||||
// remove existing entries for new rc format
|
||||
if (is_array($config['rc']) && is_array($config['rc']['param']['0'])) {
|
||||
$rc_param_count = count($config['rc']['param']);
|
||||
for ($i = 0; $i < $rc_param_count; $i++) {
|
||||
if (preg_match("/{$command}/", $config['rc']['param'][$i]['value'])) unset($config['rc']['param'][$i]);
|
||||
}
|
||||
}
|
||||
|
||||
// check FreeBSD release
|
||||
$release = explode("-", exec("uname -r"));
|
||||
|
||||
if ($release[0] >= 11.0) { // new rc format
|
||||
// postinit command
|
||||
$rc_param = [];
|
||||
$rc_param['uuid'] = uuid();
|
||||
$rc_param['name'] = "{$appName} Extension";
|
||||
$rc_param['value'] = "php {$cmd}";
|
||||
$rc_param['comment'] = "Start {$appName}";
|
||||
$rc_param['typeid'] = '2';
|
||||
$rc_param['enable'] = true;
|
||||
$config['rc']['param'][] = $rc_param;
|
||||
}
|
||||
else {
|
||||
$config['rc']['postinit']['cmd'][] = "php {$cmd}";
|
||||
}
|
||||
write_config();
|
||||
require_once($cmd);
|
||||
?>
|
||||
67
onebuttoninstaller/apps/mc-start.php
Normal file
67
onebuttoninstaller/apps/mc-start.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/*
|
||||
mc-start.php
|
||||
|
||||
Copyright (c) 2018 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
require_once("config.inc");
|
||||
require_once("/usr/local/www/ext/onebuttoninstaller/extension-lib.inc");
|
||||
$rootfolder = dirname(__FILE__);
|
||||
|
||||
$return_val = 0;
|
||||
|
||||
$pkgName = "mc";
|
||||
$pkgFileNameNeeded = "free Norton Commander";
|
||||
$manifest = ext_load_package($pkgName, $pkgFileNameNeeded, $rootfolder);
|
||||
$return_val += mwexec("ln -sf '{$rootfolder}/bin/{$pkgName}/usr/local/share/mc' /usr/local/share", true);
|
||||
$return_val += mwexec("ln -sf '{$rootfolder}/bin/{$pkgName}/usr/local/libexec/mc' /usr/local/libexec", true);
|
||||
$return_val += mwexec("ln -sf '{$rootfolder}/bin/{$pkgName}/usr/local/etc/mc' /usr/local/etc", true);
|
||||
foreach ($manifest['files'] as $mFKey => $mFValue) {
|
||||
if (strpos($mFKey, "usr/local/bin") > 0) $return_val += mwexec("ln -sf '{$rootfolder}/bin/{$pkgName}{$mFKey}' '{$mFKey}'", true);
|
||||
// if (strpos($mFKey, "usr/local/lib") > 0) $return_val += mwexec("ln -sf '{$rootfolder}/bin/{$pkgName}{$mFKey}' '{$mFKey}'", true);
|
||||
if (strpos($mFKey, "LC_MESSAGES") > 0) {
|
||||
$localeDir = dirname($mFKey);
|
||||
if (!file_exists($localeDir)) $return_val += mwexec("mkdir -p '{$localeDir}'", true);
|
||||
$return_val += mwexec("ln -sf '{$rootfolder}/bin/{$pkgName}{$mFKey}' '{$mFKey}'", true);
|
||||
}
|
||||
}
|
||||
|
||||
$pkgName = "libslang2";
|
||||
$pkgFileNameNeeded = $pkgName;
|
||||
$manifest = ext_load_package($pkgName, $pkgFileNameNeeded, $rootfolder);
|
||||
foreach ($manifest['files'] as $mFKey => $mFValue) {
|
||||
if (strpos($mFKey, "usr/local/lib/libslang.so.2") > 0) $return_val += mwexec("ln -sf '{$rootfolder}/bin/{$pkgName}{$mFKey}' '{$mFKey}'", true);
|
||||
}
|
||||
|
||||
$pkgName = "libssh2";
|
||||
$pkgFileNameNeeded = "^libssh2";
|
||||
$manifest = ext_load_package($pkgName, $pkgFileNameNeeded, $rootfolder);
|
||||
foreach ($manifest['files'] as $mFKey => $mFValue) {
|
||||
if (strpos($mFKey, "usr/local/lib/libssh2.so.1") > 0) $return_val += mwexec("ln -sf '{$rootfolder}/bin/{$pkgName}{$mFKey}' '{$mFKey}'", true);
|
||||
}
|
||||
|
||||
if ($return_val == 0) mwexec("logger midnightcommander-extension: started successfully");
|
||||
else mwexec("logger midnightcommander-extension: error(s) during startup, failed with return value = {$return_val}");
|
||||
echo "RETVAL = {$return_val}\n";
|
||||
?>
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
universal postinit file for CLI extensions
|
||||
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,8 +29,8 @@
|
||||
require_once("config.inc");
|
||||
|
||||
$appName = "Midnight Commander";
|
||||
$command = "mcommander.sh";
|
||||
$cmd = dirname(__FILE__)."/".$command;
|
||||
$command = "mc-start.php";
|
||||
$cmd = dirname(__FILE__)."/{$command}";
|
||||
|
||||
// remove start/stop commands
|
||||
// remove existing old rc format entries
|
||||
@@ -56,14 +56,15 @@ if ($release[0] >= 11.0) { // new rc format
|
||||
$rc_param = [];
|
||||
$rc_param['uuid'] = uuid();
|
||||
$rc_param['name'] = "{$appName} Extension";
|
||||
$rc_param['value'] = "{$cmd}";
|
||||
$rc_param['value'] = "php {$cmd}";
|
||||
$rc_param['comment'] = "Start {$appName}";
|
||||
$rc_param['typeid'] = '2';
|
||||
$rc_param['enable'] = true;
|
||||
$config['rc']['param'][] = $rc_param;
|
||||
}
|
||||
else {
|
||||
$config['rc']['postinit']['cmd'][] = "{$cmd}";
|
||||
$config['rc']['postinit']['cmd'][] = "php {$cmd}";
|
||||
}
|
||||
write_config();
|
||||
require_once($cmd);
|
||||
?>
|
||||
|
||||
42
onebuttoninstaller/apps/ncdu-start.php
Normal file
42
onebuttoninstaller/apps/ncdu-start.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/*
|
||||
ncdu-start.php
|
||||
|
||||
Copyright (c) 2018 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
require_once("config.inc");
|
||||
require_once("/usr/local/www/ext/onebuttoninstaller/extension-lib.inc");
|
||||
$rootfolder = dirname(__FILE__);
|
||||
|
||||
$return_val = 0;
|
||||
|
||||
$pkgName = "ncdu";
|
||||
$pkgFileNameNeeded = $pkgName;
|
||||
$manifest = ext_load_package($pkgName, $pkgFileNameNeeded, $rootfolder);
|
||||
$return_val += mwexec("ln -sf '{$rootfolder}/bin/{$pkgName}/usr/local/bin/ncdu' /usr/local/bin", true);
|
||||
|
||||
if ($return_val == 0) mwexec("logger {$pkgName}-extension: started successfully");
|
||||
else mwexec("logger {$pkgName}-extension: error(s) during startup, failed with return value = {$return_val}");
|
||||
echo "RETVAL = {$return_val}\n";
|
||||
?>
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
universal postinit file for CLI extensions
|
||||
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,8 +29,8 @@
|
||||
require_once("config.inc");
|
||||
|
||||
$appName = "NCurses Disk Usage";
|
||||
$command = "ncdu.sh";
|
||||
$cmd = dirname(__FILE__)."/".$command;
|
||||
$command = "ncdu-start.php";
|
||||
$cmd = dirname(__FILE__)."/{$command}";
|
||||
|
||||
// remove start/stop commands
|
||||
// remove existing old rc format entries
|
||||
@@ -56,14 +56,15 @@ if ($release[0] >= 11.0) { // new rc format
|
||||
$rc_param = [];
|
||||
$rc_param['uuid'] = uuid();
|
||||
$rc_param['name'] = "{$appName} Extension";
|
||||
$rc_param['value'] = "{$cmd}";
|
||||
$rc_param['value'] = "php {$cmd}";
|
||||
$rc_param['comment'] = "Start {$appName}";
|
||||
$rc_param['typeid'] = '2';
|
||||
$rc_param['enable'] = true;
|
||||
$config['rc']['param'][] = $rc_param;
|
||||
}
|
||||
else {
|
||||
$config['rc']['postinit']['cmd'][] = "{$cmd}";
|
||||
$config['rc']['postinit']['cmd'][] = "php {$cmd}";
|
||||
}
|
||||
write_config();
|
||||
require_once($cmd);
|
||||
?>
|
||||
|
||||
44
onebuttoninstaller/apps/show-MANIFEST.php
Normal file
44
onebuttoninstaller/apps/show-MANIFEST.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/*
|
||||
show-MANIFEST.php
|
||||
|
||||
Copyright (c) 2018 - 2019 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
if (!function_exists('ext_load_config')) {
|
||||
function ext_load_config($config_file, $assoc = true, $depth = 512, $options = 0) {
|
||||
if (is_file($config_file)) {
|
||||
if (($config_data = file_get_contents($config_file)) === false) return false;
|
||||
$config_data = json_decode($config_data, $assoc, $depth, $options);
|
||||
return $config_data;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
$fileName = $argv[1];
|
||||
echo "Show '{$fileName}':\n";
|
||||
if (($manifest = ext_load_config($fileName)) !== false) print_r($manifest);
|
||||
else echo "File '{$fileName}' not found!\n";
|
||||
?>
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
extension-lib.inc
|
||||
|
||||
Copyright (c) 2016 - 2018 Andreas Schmidhuber
|
||||
Copyright (c) 2016 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -26,13 +26,40 @@
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
$extension_lib_version = "1.2";
|
||||
$extension_lib_version = "1.4";
|
||||
/* Version history:
|
||||
* 1.4 2019.05.14 new function ext_load_package
|
||||
* 1.3 2018.12.01 function ext_load_config: removed -> $config_data = utf8_encode($config_data); reason: wrong national character encoding
|
||||
* 1.2 2018.08.13 function ext_check_version: append line break to the output message
|
||||
* 1.1 2017.02.28 save config in ext_remove_rc_commands and ext_create_rc_commands
|
||||
* 1.0 2017.02.27 includes changes for PHP 7.1
|
||||
*/
|
||||
|
||||
/* function ext_load_package
|
||||
* load packages and compare already installed packages for updates
|
||||
* params:
|
||||
* $pkgName: plain package name
|
||||
* $pkgFileNameNeeded: unique string for pkg search to retrive the right package
|
||||
* $rootfolder: extension root location
|
||||
* return:
|
||||
* package manifest array
|
||||
*/
|
||||
if (!function_exists('ext_load_package')) {
|
||||
function ext_load_package($pkgName, $pkgFileNameNeeded, $rootfolder) {
|
||||
if (($manifest = ext_load_config("{$rootfolder}/bin/{$pkgName}/+MANIFEST")) !== false) $pkgInstalledVersion = "{$manifest['name']}-{$manifest['version']}"; // currently installed pkg
|
||||
else {
|
||||
$pkgNeeded = exec("pkg search {$pkgName} | awk '/{$pkgFileNameNeeded}/ {print $1}'", $execOutput, $return_val); // retrieve available packages
|
||||
$pkgFile = "{$rootfolder}/bin/All/{$pkgNeeded}.txz"; // create package file name
|
||||
if (!is_file($pkgFile)) exec("pkg fetch -y -o '{$rootfolder}/bin' {$pkgNeeded}", $execOutput, $return_val); // fetch necessary package
|
||||
$return_val += mwexec("mkdir -p '{$rootfolder}/bin/{$pkgName}' && tar -xf '{$pkgFile}' -C '{$rootfolder}/bin/{$pkgName}'", true); // extract package
|
||||
if (($manifest = ext_load_config("{$rootfolder}/bin/{$pkgName}/+MANIFEST")) !== false) $pkgInstalledVersion = "{$manifest['name']}-{$manifest['version']}";
|
||||
}
|
||||
echo "Needed : ".$pkgNeeded."\n";
|
||||
echo "Installed: ".$pkgInstalledVersion."\n";
|
||||
return $manifest;
|
||||
}
|
||||
}
|
||||
|
||||
/* function ext_check_release
|
||||
* checks current release against a minimal neccessary release
|
||||
* params:
|
||||
@@ -182,7 +209,6 @@ if (!function_exists('ext_load_config')) {
|
||||
function ext_load_config($config_file, $assoc = true, $depth = 512, $options = 0) {
|
||||
if (is_file($config_file)) {
|
||||
if (($config_data = file_get_contents($config_file)) === false) return false;
|
||||
$config_data = utf8_encode($config_data);
|
||||
$config_data = json_decode($config_data, $assoc, $depth, $options);
|
||||
return $config_data;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ BitTorrent Sync###<font color="green">RELEASE<br>0.7.x</font>###btsync###fetch h
|
||||
Syncthing###<font color="green">RELEASE<br>0.2.x</font>###syncthing###fetch https://raw.github.com/crestAT/nas4free-syncthing/master/stg-install.php && chmod 770 stg*install.php###stg-install.php###Extension to install / configure / backup / update / manage and remove Syncthing (STG) application on XigmaNAS (N4F) servers.<br><br>The extension works on all plattforms, does not need jail or pkg_add, add pages to XigmaNAS WebGUI extensions, features configuration, application update & backup management, scheduling and log view with filter / search capabilities.<br><br><font color="blue"><b>Note:</b> The current 10.3 and 11.x series of XigmaNAS contain Syncthing already out of the box so this extensions is mainly for older releases OR if one need to upgrade/rollback Syncthing versions without upgrade/downgrade the XigmaNAS firmware for compatibility reasons with other devices.</font><br><br>Read more ... <a href='https://github.com/crestAT/nas4free-syncthing/wiki' target='_blank'>GitHub Wiki</a>###-###
|
||||
TheBrig###<font color="green">RELEASE<br>0.9x</font>###thebrig###mkdir -p thebrig && cd thebrig && fetch https://raw.githubusercontent.com/fsbruva/thebrig/alcatraz/thebrig_install.sh && chmod a+x thebrig_install.sh && sh thebrig_install.sh###-###Jail manager extension for XigmaNAS.<br><br><font color="red"><b>Note:</b> After the installation navigate to rudimentary config tab and push Save to finish the installation.</font><br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=79&t=3894' target='_blank'>XigmaNAS Forum</a>###10.3###
|
||||
DNSMasq DHCP Server###<font color="green">RELEASE<br>0.4x</font>###dnsmasq###mkdir -p dnsmasq && cd dnsmasq && fetch https://raw.github.com/alexey1234/nas4free-dnsmasq/master/dnsmasq_install.sh && chmod a+x dnsmasq_install.sh && sh dnsmasq_install.sh `pwd`###-###DNSMasq DHCP Server extension for XigmaNAS.<br><br><font color="red"><b>Note:</b> After the installation navigate to rudimentary config tab and push Save to finish the installation.</font><br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=71&t=3002' target='_blank'>XigmaNAS Forum</a>###rpi, rpi2, rpi3, bananapi###
|
||||
Midnight Commander###<font color="green">RELEASE<br>4.8.8</font>###mcommander.sh###mkdir -p midnightcommander && cd midnightcommander && cp /usr/local/www/ext/onebuttoninstaller/../apps/mcommander.* . && chmod u+x mcommander.sh && `pwd`/mcommander.sh###midnightcommander/mcommander.postinit###Midnight Commander for XigmaNAS.<br><br>GNU Midnight Commander is a visual file manager, licensed under GNU General Public License and therefore qualifies as Free Software. It's a feature rich full-screen text mode application that allows you to copy, move and delete files and whole directory trees, search for files and run commands in the subshell. Internal viewer and editor are included.<br><br>After successful installation you can use Midnight Commander in the system console shell or if you connect via ssh. To start the Midnight Commander just enter the command <b>mc</b> in the CLI.<br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=70&t=187' target='_blank'>XigmaNAS Forum</a>###rpi, rpi2, rpi3, bananapi###
|
||||
NCurses Disk Usage###<font color="green">RELEASE<br>1.12</font>###ncdu.sh###mkdir -p ncdu && cd ncdu && cp /usr/local/www/ext/onebuttoninstaller/../apps/ncdu.* . && chmod u+x ncdu.sh && `pwd`/ncdu.sh###ncdu/ncdu.postinit###NCurses Disk Usage<br><br>Ncdu is a disk usage analyzer with an ncurses interface. It is designed to find space hogs on a remote server where you don't have an entire graphical setup available, but it is a useful tool even on regular desktop systems.<br><br>After successful installation you can use NCDU in the system console shell or if you connect via ssh. To start NCDU just enter the command <b>ncdu</b> in the CLI.<br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=70&t=13704&hilit=ncdu' target='_blank'>XigmaNAS Forum</a>###rpi, rpi2, rpi3, bananapi###
|
||||
Virtual Machine BHYVE###<font color="red">ALPHA<br>0.x</font>###bhyve###mkdir -p bhyve && cd bhyve && fetch https://raw.githubusercontent.com/alexey1234/vmbhyve_nas4free/master/bhyve_install.sh && chmod a+x bhyve_install.sh && sh bhyve_install.sh `pwd`###-###Webgui to bhyve for XigmaNAS. Based on vm-bhyve.<br><br><font color="red"><b>Note:</b> After the installation navigate to rudimentary config tab and push Save to finish the installation.</font><br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=71&t=10433#p65157' target='_blank'>XigmaNAS Forum</a>###x86, 10.2, rpi, rpi2, rpi3, bananapi###
|
||||
Plex Media Server###<font color="green">RELEASE<br>4.3.x</font>###plexinit###mkdir -p plex && cd plex && fetch https://raw.githubusercontent.com/JRGTH/xigmanas-plex-extension/master/plex/plexinit && chmod +x plexinit && ./plexinit -o###plex/postinit###Plex Media Server Add-On for XigmaNAS 11.0 and later.<br><br>The extension works on XigmaNAS 11.0 and later versions, don't need jail, fstab or unionfs configs, self contained and portable package, single script for management and startup, easy to upgrade/rollback while maintaining the actual Plex configuration.<br><br><b>Note: Plex Pass is available at the beta channel in OneButtonInstaller - activate 'Beta releases' in Extensions > OneButtonInstaller > Configuration to get it in shown in the extensions list!<br>To install Plex Pass a previous standard Plex installation must be uninstalled with Extensions > Plex Media Server > Uninstall (Plexdata can stay intact - don't tick to delete the user data as well) and afterwards the Plex Pass package can be installed!</b><br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=71&t=11184#p69861' target='_blank'>XigmaNAS Forum</a>###x86, 10.3, rpi, rpi2, rpi3, bananapi###
|
||||
Downloady###<font color="green">RELEASE<br>0.1.x</font>###downloady###mkdir -p downloady && cd downloady && fetch https://raw.github.com/crestAT/nas4free-downloady/master/downloady/downloady-install.php && chmod 770 downloady*install.php###downloady/downloady-install.php###Simple PHP Download Manager for http/https/ftp sites based on Downloady by CyberLeo|cyberLeo Projects.<br><br>The extension fully integrates a wget based download manager into the XigmaNAS WebGUI, works on all plattforms (x86 & x64, ARM, embedded & full), does not need jail or pkg_add, enhance pages of the XigmaNAS WebGUI and features configuration and extension maintenance (update & removal inside the WebGUI). Based on Downloady by CyberLeo it has been extended and offers restart on server reboot, bandwidth limits for downloads as well as a daily scheduler to start/stop Downloady at a specific time.<br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=71&t=11719&hilit=downloady' target='_blank'>XigmaNAS Forum</a>
|
||||
@@ -19,3 +17,6 @@ PyTivo###<font color="green">RELEASE<br>0.1.x</font>###pytivoinit###mkdir -p pyt
|
||||
BE Manager###<font color="green">RELEASE<br>0.2.x</font>###beminit###mkdir -p bemanager && cd bemanager && fetch https://raw.githubusercontent.com/JRGTH/xigmanas-bem-extension/master/beminit && chmod +x beminit && ./beminit -o###bemanager/postinit###Boot Environments Manager extension for XigmaNAS.<br><br>Utility to manage Boot Environments with ZFS compliant platforms.<br><br><font color="red"><b>Note:</b> This extension is compatible with RootOnZFS platforms only.</font><br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=71&t=14585#p90458' target='_blank'>XigmaNAS Forum</a>###11.0, x86, rpi, rpi2, rpi3, bananapi###
|
||||
Themes###<font color="green">RELEASE<br>1.x</font>###themes-start###mkdir -p themes && cd themes && fetch https://raw.github.com/crestAT/nas4free-themes/master/themes/themes-install.php && chmod +x themes* ###themes/themes-install.php###XigmaNAS themes extension.<br><br>The extension consists of a theme manager to choose from different as well as a simple theme designer. The themes are based on the original XigmaNAS WebGUI - the theme designer provide the means to change colors in an easy-to-use way and also to choose different device size bar types for Status > System and swap devices.<br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=71&t=14778#p91734' target='_blank'>XigmaNAS Forum</a>###11.2, x86, rpi, rpi2, rpi3, bananapi###
|
||||
Bastille Manager###<font color="green">RELEASE<br>1.x</font>###bastille-init###mkdir -p -m 0750 bastille && cd bastille && fetch --no-verify-peer https://raw.githubusercontent.com/JRGTH/xigmanas-bastille-extension/master/bastille-init && chmod +x bastille-init && ./bastille-init -o###bastille/postinit###XigmaNAS Bastille Extension<br><br>A ZERO dependency Bastille Jail/Container Manager Extension for XigmaNAS. Containers creation and management made easy!<br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=71&t=14848&p=92140#p92140' target='_blank'>XigmaNAS Forum</a>###11.2, x86, rpi, rpi2, rpi3, bananapi###
|
||||
NCurses Disk Usage###<font color="green">RELEASE<br>1.x</font>###ncdu-start.php###chmod u+x /usr/local/www/ext/onebuttoninstaller/../apps/*###onebuttoninstaller/apps/ncdu.postinit###NCurses Disk Usage CLI extension<br><br>Ncdu is a disk usage analyzer with an ncurses interface. It is designed to find space hogs on a remote server where you don't have an entire graphical setup available, but it is a useful tool even on regular desktop systems.<br><br>After successful installation you can use NCDU in the system console shell or if you connect via ssh. To start NCDU just enter the command <b>ncdu</b> in the CLI.<br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=70&t=13704&hilit=ncdu' target='_blank'>XigmaNAS Forum</a>###rpi, rpi2, rpi3, bananapi###
|
||||
Midnight Commander###<font color="green">RELEASE<br>4.x</font>###mc-start.php###chmod u+x /usr/local/www/ext/onebuttoninstaller/../apps/*###onebuttoninstaller/apps/mcommander.postinit###Midnight Commander CLI extension<br><br>GNU Midnight Commander is a visual file manager, licensed under GNU General Public License and therefore qualifies as Free Software. It's a feature rich full-screen text mode application that allows you to copy, move and delete files and whole directory trees, search for files and run commands in the subshell. Internal viewer and editor are included.<br><br>After successful installation you can use Midnight Commander in the system console shell or if you connect via ssh. To start the Midnight Commander just enter the command <b>mc</b> in the CLI.<br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=70&t=187' target='_blank'>XigmaNAS Forum</a>###rpi, rpi2, rpi3, bananapi###
|
||||
Htop###<font color="green">RELEASE<br>2.x</font>###htop-start.php###chmod u+x /usr/local/www/ext/onebuttoninstaller/../apps/*###onebuttoninstaller/apps/htop.postinit###htop CLI extension<br><br>htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.<br><br>After successful installation you can use htop in the system console shell or if you connect via ssh. To start htop just enter the command <b>htop</b> in the CLI.<br><br>Read more ... <a href='https://github.com/hishamhm/htop' target='_blank'>Github</a>###rpi, rpi2, rpi3, bananapi###
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-config.php
|
||||
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -138,7 +138,7 @@ function enable_change(enable_change) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<form action="onebuttoninstaller-config.php" method="post" name="iform" id="iform">
|
||||
<form action="<?php echo $configName; ?>-config.php" method="post" name="iform" id="iform" onsubmit="spinner()">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td class="tabnavtbl">
|
||||
<ul id="tabnav">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-install.php
|
||||
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -25,7 +25,7 @@
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
$v = "v0.4.0.2"; // extension version
|
||||
$v = "v0.4.1"; // extension version
|
||||
$appName = "OneButtonInstaller";
|
||||
$configName = "onebuttoninstaller";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-start.php
|
||||
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-stop.php
|
||||
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-update_extension.php
|
||||
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -74,12 +74,7 @@ bindtextdomain($domain, $localeOSDirectory);
|
||||
include("fbegin.inc");
|
||||
bindtextdomain($domain, $localeExtDirectory);
|
||||
?>
|
||||
<!-- The Spinner Elements -->
|
||||
<?php include("ext/{$configName}/spinner.inc");?>
|
||||
<script src="ext/onebuttoninstaller/spin.min.js"></script>
|
||||
<!-- use: onsubmit="spinner()" within the form tag -->
|
||||
|
||||
<form action="onebuttoninstaller-update_extension.php" method="post" name="iform" id="iform" onsubmit="spinner()">
|
||||
<form action="<?php echo $configName; ?>-update_extension.php" method="post" name="iform" id="iform" onsubmit="spinner()">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td class="tabnavtbl">
|
||||
<ul id="tabnav">
|
||||
@@ -112,7 +107,7 @@ bindtextdomain($domain, $localeExtDirectory);
|
||||
<tr>
|
||||
<td class="listt">
|
||||
<div>
|
||||
<textarea style="width: 98%;" id="content" name="content" class="listcontent" cols="1" rows="25" readonly="readonly"><?php unset($lines); exec("/bin/cat {$configuration['rootfolder']}/release_notes.txt", $lines); foreach ($lines as $line) { echo $line."\n"; }?></textarea>
|
||||
<textarea style="width: 100%;" id="content" name="content" class="listcontent" cols="1" rows="25" readonly="readonly"><?php unset($lines); exec("/bin/cat {$configuration['rootfolder']}/release_notes.txt", $lines); foreach ($lines as $line) { echo $line."\n"; }?></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller.php
|
||||
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2020 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -263,12 +263,7 @@ bindtextdomain($domain, $localeOSDirectory);
|
||||
include("fbegin.inc");
|
||||
bindtextdomain($domain, $localeExtDirectory);
|
||||
?>
|
||||
<!-- The Spinner Elements -->
|
||||
<?php include("ext/onebuttoninstaller/spinner.inc");?>
|
||||
<script src="ext/onebuttoninstaller/spin.min.js"></script>
|
||||
<!-- use: onsubmit="spinner()" within the form tag -->
|
||||
|
||||
<form action="onebuttoninstaller.php" method="post" name="iform" id="iform" onsubmit="spinner()">
|
||||
<form action="<?php echo $configName; ?>.php" method="post" name="iform" id="iform" onsubmit="spinner()">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td class="tabnavtbl">
|
||||
<ul id="tabnav">
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
Version Date Description
|
||||
0.4.1 2020.06.01 N: Htop CLI extension
|
||||
C: MidnightCommander & NCDU - improved startup with checks/updates for new releases & changed XigmaNAS firmware
|
||||
C: update Czech translation
|
||||
C: update Spanish translation
|
||||
C: update French translation
|
||||
C: update Ukrainian translation
|
||||
C: update Chinese translation
|
||||
C: update Turkish translation
|
||||
|
||||
0.4.0.2 2018.10.18 F: installation errors on multiple installations in some cases
|
||||
C: update Russian translation
|
||||
C: update Ukrainian translation
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.4.0.2
|
||||
0.4.1
|
||||
Reference in New Issue
Block a user