forked from Mirrors/nas4free-onebuttoninstaller
Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7169a5df11 | ||
|
|
afac4582a3 | ||
|
|
e13d0697aa | ||
|
|
e099e6a1a3 | ||
|
|
5dce9f59a5 | ||
|
|
5dd9f9b9d7 | ||
|
|
537f0d1e35 | ||
|
|
e436f7b6f0 | ||
|
|
f9c222824e | ||
|
|
7deac353e3 | ||
|
|
b620e047a2 | ||
|
|
d8e1934620 | ||
|
|
60442895f6 | ||
|
|
45a7f7ca05 | ||
|
|
7042e5958a | ||
|
|
d07c88c4c4 | ||
|
|
4659cb77cb | ||
|
|
3405a8b116 | ||
|
|
2c7cfd1c2b | ||
|
|
b9f2003020 | ||
|
|
4019d157d9 | ||
|
|
96081af83e | ||
|
|
c0fae3308d | ||
|
|
4fd79c7566 | ||
|
|
bd93001678 | ||
|
|
2eff3da6a6 | ||
|
|
57933c9359 | ||
|
|
d9a2d132b3 | ||
|
|
6cebc0d1d2 | ||
|
|
4f8c2385f0 | ||
|
|
db32583c34 | ||
|
|
061867ff8b |
8
OBI.php
8
OBI.php
@@ -76,12 +76,13 @@ if (isset($_POST['save']) && $_POST['save']) {
|
||||
if (empty($input_errors)) {
|
||||
$config['onebuttoninstaller']['storage_path'] = !empty($_POST['storage_path']) ? $_POST['storage_path'] : $g['media_path'];
|
||||
$config['onebuttoninstaller']['storage_path'] = rtrim($config['onebuttoninstaller']['storage_path'],'/'); // ensure to have NO trailing slash
|
||||
if (strpos($config['onebuttoninstaller']['storage_path'], "/mnt/") === false) {
|
||||
if (!isset($_POST['path_check']) && (strpos($config['onebuttoninstaller']['storage_path'], "/mnt/") === false)) {
|
||||
$input_errors[] = gettext("The common directory for all extensions MUST be set to a directory below <b>'/mnt/'</b> to prevent to loose the extensions after a reboot on embedded systems!");
|
||||
}
|
||||
else {
|
||||
if (!is_dir($config['onebuttoninstaller']['storage_path'])) mkdir($config['onebuttoninstaller']['storage_path'], 0775, true);
|
||||
change_perms($config['onebuttoninstaller']['storage_path']);
|
||||
$config['onebuttoninstaller']['path_check'] = isset($_POST['path_check']) ? true : false;
|
||||
$install_dir = $config['onebuttoninstaller']['storage_path']."/"; // get directory where the installer script resides
|
||||
if (!is_dir("{$install_dir}onebuttoninstaller/log")) { mkdir("{$install_dir}onebuttoninstaller/log", 0775, true); }
|
||||
$return_val = mwexec("fetch {$verify_hostname} -vo {$install_dir}onebuttoninstaller/onebuttoninstaller-install.php 'https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/onebuttoninstaller-install.php'", true);
|
||||
@@ -91,7 +92,7 @@ if (isset($_POST['save']) && $_POST['save']) {
|
||||
}
|
||||
else {
|
||||
$input_errors[] = sprintf(gettext("Installation file %s not found, installation aborted!"), "{$install_dir}onebuttoninstaller/onebuttoninstaller-install.php");
|
||||
exit;
|
||||
return;
|
||||
}
|
||||
mwexec("rm -Rf ext/OBI; rm -f OBI.php", true);
|
||||
header("Location:onebuttoninstaller-config.php");
|
||||
@@ -107,6 +108,7 @@ if (isset($_POST['cancel']) && $_POST['cancel']) {
|
||||
}
|
||||
|
||||
$pconfig['storage_path'] = !empty($config['onebuttoninstaller']['storage_path']) ? $config['onebuttoninstaller']['storage_path'] : $g['media_path'];
|
||||
$pconfig['path_check'] = isset($config['onebuttoninstaller']['path_check']) ? true : false;
|
||||
|
||||
include("fbegin.inc"); ?>
|
||||
<form action="OBI.php" method="post" name="iform" id="iform">
|
||||
@@ -117,7 +119,7 @@ include("fbegin.inc"); ?>
|
||||
<table width="100%" border="0" cellpadding="6" cellspacing="0">
|
||||
<?php html_titleline($application);?>
|
||||
<?php html_filechooser("storage_path", gettext("Common directory"), $pconfig['storage_path'], gettext("Common directory for all extensions (a persistant place where all extensions are/should be - a directory below <b>/mnt/</b>)."), $pconfig['storage_path'], true, 60);?>
|
||||
</table>
|
||||
<?php html_checkbox("path_check", gettext("Path check"), $pconfig['path_check'], gettext("If this option is selected no examination of the common directory path will be carried out (whether it was set to a directory below /mnt/)."), "<b><font color='red'>".gettext("Please use this option only if you know what you are doing!")."</font></b>", false);?> </table>
|
||||
<div id="submit">
|
||||
<input id="save" name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>"/>
|
||||
<input id="cancel" name="cancel" type="submit" class="formbtn" value="<?=gettext("Cancel");?>"/>
|
||||
|
||||
@@ -1,13 +1,71 @@
|
||||
<?php
|
||||
/*
|
||||
fail2ban.postinit
|
||||
|
||||
Copyright (c) 2015 - 2017 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.
|
||||
|
||||
The views and conclusions contained in the software and documentation are those
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
$command = "fail2ban_start.sh";
|
||||
$cmd = dirname(__FILE__)."/".$command;
|
||||
require_once("config.inc");
|
||||
require_once("functions.inc");
|
||||
$i =0;
|
||||
if ( is_array($config['rc']['postinit'] ) && is_array( $config['rc']['postinit']['cmd'] ) ) {
|
||||
for ($i; $i < count($config['rc']['postinit']['cmd']);) {
|
||||
if (preg_match("/$command/", $config['rc']['postinit']['cmd'][$i])) break; ++$i; }
|
||||
}
|
||||
$config['rc']['postinit']['cmd'][$i] = $config['cmd']."$cmd";
|
||||
write_config();
|
||||
|
||||
// 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'] = "Fail2Ban Extension";
|
||||
$rc_param['value'] = "{$cmd}";
|
||||
$rc_param['comment'] = "Start Fail2Ban";
|
||||
$rc_param['typeid'] = '2';
|
||||
$rc_param['enable'] = true;
|
||||
$config['rc']['param'][] = $rc_param;
|
||||
}
|
||||
else {
|
||||
$config['rc']['postinit']['cmd'][] = "{$cmd}";
|
||||
}
|
||||
write_config();
|
||||
?>
|
||||
|
||||
@@ -1,13 +1,72 @@
|
||||
<?php
|
||||
/*
|
||||
mcommander.postinnit
|
||||
|
||||
Copyright (c) 2015 - 2017 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.
|
||||
|
||||
The views and conclusions contained in the software and documentation are those
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
require_once("config.inc");
|
||||
|
||||
$command = "mcommander.sh";
|
||||
$cmd = dirname(__FILE__)."/".$command;
|
||||
require_once("config.inc");
|
||||
require_once("functions.inc");
|
||||
$i =0;
|
||||
if ( is_array($config['rc']['postinit'] ) && is_array( $config['rc']['postinit']['cmd'] ) ) {
|
||||
for ($i; $i < count($config['rc']['postinit']['cmd']);) {
|
||||
if (preg_match("/$command/", $config['rc']['postinit']['cmd'][$i])) break; ++$i; }
|
||||
}
|
||||
$config['rc']['postinit']['cmd'][$i] = $config['cmd']."$cmd";
|
||||
write_config();
|
||||
|
||||
// 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'] = "MidnightCommander Extension";
|
||||
$rc_param['value'] = "{$cmd}";
|
||||
$rc_param['comment'] = "Start MidnightCommander";
|
||||
$rc_param['typeid'] = '2';
|
||||
$rc_param['enable'] = true;
|
||||
$config['rc']['param'][] = $rc_param;
|
||||
}
|
||||
else {
|
||||
$config['rc']['postinit']['cmd'][] = "{$cmd}";
|
||||
}
|
||||
write_config();
|
||||
?>
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
# date: 2014-12-18 ; Update for v9.3; Clean up
|
||||
# date: 2015-02-21 ; Update mc package to mc-4.8.11.tbz
|
||||
# date: 2016-08-04 ; check hardware platform to use it on i386 too - author: crest <info@a3s.at>
|
||||
# date: 2016-11-21 ; create symlinks for v11.x compatibility - author: crest <info@a3s.at>
|
||||
#
|
||||
# purpose: Install Midnight Commander on NAS4Free (embedded version).
|
||||
# Note: Check the end of the page.
|
||||
#
|
||||
@@ -82,6 +84,9 @@ cd /usr/local/lib
|
||||
[ -e libpcre.so.3 ] || ln -s /usr/local/lib/libpcre.so.1 libpcre.so.3
|
||||
[ -e libintl.so.9 ] || ln -s /usr/local/lib/libintl.so.8 libintl.so.9
|
||||
[ -e libiconv.so.3 ] || ln -s /usr/local/lib/libiconv.so.2 libiconv.so.3
|
||||
# Symlinks for v11.x
|
||||
if [ -e /usr/lib/libssl.so.8 ]; then ln -sf /usr/lib/libssl.so.8 libssl.so.6; fi
|
||||
if [ -e /lib/libcrypto.so.8 ]; then ln -sf /lib/libcrypto.so.8 libcrypto.so.6; fi
|
||||
cd -
|
||||
|
||||
# Aliases
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
spinner.inc
|
||||
|
||||
Copyright (c) 2015 - 2016 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Uses spin.js by Felix Gnass (fgnass) at http://spin.js.org
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-config.php
|
||||
|
||||
Copyright (c) 2015 - 2016 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -83,26 +83,37 @@ if (isset($_POST['save']) && $_POST['save']) {
|
||||
if (isset($_POST['enable'])) {
|
||||
$config['onebuttoninstaller']['storage_path'] = !empty($_POST['storage_path']) ? $_POST['storage_path'] : $g['media_path'];
|
||||
$config['onebuttoninstaller']['storage_path'] = rtrim($config['onebuttoninstaller']['storage_path'],'/'); // ensure to have NO trailing slash
|
||||
if (strpos($config['onebuttoninstaller']['storage_path'], "/mnt/") === false) {
|
||||
if (!isset($_POST['path_check']) && (strpos($config['onebuttoninstaller']['storage_path'], "/mnt/") === false)) {
|
||||
$input_errors[] = gettext("The common directory for all extensions MUST be set to a directory below <b>'/mnt/'</b> to prevent to loose the extensions after a reboot on embedded systems!");
|
||||
}
|
||||
else {
|
||||
if (!is_dir($config['onebuttoninstaller']['storage_path'])) mkdir($config['onebuttoninstaller']['storage_path'], 0775, true);
|
||||
change_perms($_POST['storage_path']);
|
||||
$config['onebuttoninstaller']['path_check'] = isset($_POST['path_check']) ? true : false;
|
||||
$config['onebuttoninstaller']['re_install'] = isset($_POST['re_install']) ? true : false;
|
||||
$config['onebuttoninstaller']['auto_update'] = isset($_POST['auto_update']) ? true : false;
|
||||
$config['onebuttoninstaller']['show_beta'] = isset($_POST['show_beta']) ? true : false;
|
||||
$savemsg .= get_std_save_message(write_config());
|
||||
$savemsg .= get_std_save_message(write_config())." ";
|
||||
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-start.php");
|
||||
}
|
||||
}
|
||||
else $savemsg .= get_std_save_message(write_config());
|
||||
else $savemsg .= get_std_save_message(write_config())." ";
|
||||
} // end of empty input_errors
|
||||
}
|
||||
|
||||
$pconfig['enable'] = isset($config['onebuttoninstaller']['enable']) ? true : false;
|
||||
$pconfig['storage_path'] = !empty($config['onebuttoninstaller']['storage_path']) ? $config['onebuttoninstaller']['storage_path'] : $g['media_path'];
|
||||
$pconfig['path_check'] = isset($config['onebuttoninstaller']['path_check']) ? true : false;
|
||||
$pconfig['re_install'] = isset($config['onebuttoninstaller']['re_install']) ? true : false;
|
||||
$pconfig['auto_update'] = isset($config['onebuttoninstaller']['auto_update']) ? true : false;
|
||||
$pconfig['show_beta'] = isset($config['onebuttoninstaller']['show_beta']) ? true : false;
|
||||
|
||||
$return_val = mwexec("fetch -o {$config['onebuttoninstaller']['rootfolder']}log/version.txt https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/version.txt", false);
|
||||
if ($return_val == 0) {
|
||||
$server_version = exec("cat {$config['onebuttoninstaller']['rootfolder']}log/version.txt");
|
||||
if ($server_version != $config['onebuttoninstaller']['version']) { $savemsg .= sprintf(gettext("New extension version %s available, push '%s' button to install the new version!"), $server_version, gettext("Maintenance")); }
|
||||
} //EOversion-check
|
||||
|
||||
bindtextdomain("nas4free", "/usr/local/share/locale"); // to get the right main menu language
|
||||
include("fbegin.inc");
|
||||
bindtextdomain("nas4free", "/usr/local/share/locale-obi"); ?>
|
||||
@@ -112,6 +123,8 @@ function enable_change(enable_change) {
|
||||
var endis = !(document.iform.enable.checked || enable_change);
|
||||
document.iform.storage_path.disabled = endis;
|
||||
document.iform.storage_pathbrowsebtn.disabled = endis;
|
||||
document.iform.path_check.disabled = endis;
|
||||
document.iform.re_install.disabled = endis;
|
||||
document.iform.auto_update.disabled = endis;
|
||||
document.iform.show_beta.disabled = endis;
|
||||
}
|
||||
@@ -138,6 +151,8 @@ function enable_change(enable_change) {
|
||||
<?php html_titleline_checkbox("enable", gettext("OneButtonInstaller"), $pconfig['enable'], gettext("Enable"), "enable_change(false)");?>
|
||||
<?php html_text("installation_directory", gettext("Installation directory"), sprintf(gettext("The extension is installed in %s"), $config['onebuttoninstaller']['rootfolder']));?>
|
||||
<?php html_filechooser("storage_path", gettext("Common directory"), $pconfig['storage_path'], gettext("Common directory for all extensions (a persistant place where all extensions are/should be - a directory below <b>/mnt/</b>)."), $pconfig['storage_path'], true, 60);?>
|
||||
<?php html_checkbox("path_check", gettext("Path check"), $pconfig['path_check'], gettext("If this option is selected no examination of the common directory path will be carried out (whether it was set to a directory below /mnt/)."), "<b><font color='red'>".gettext("Please use this option only if you know what you are doing!")."</font></b>", false);?>
|
||||
<?php html_checkbox("re_install", gettext("Re-install"), $pconfig['re_install'], gettext("If enabled it is possible to install extensions even if they are already installed."), "<b><font color='red'>".gettext("Please use this option only if you know what you are doing!")."</font></b>", false);?>
|
||||
<?php html_checkbox("auto_update", gettext("Update"), $pconfig['auto_update'], gettext("Update extensions list automatically."), "", false);?>
|
||||
<?php html_checkbox("show_beta", gettext("Beta releases"), $pconfig['show_beta'], gettext("If enabled, extensions in beta state will be shown in the extensions list."), "", false);?>
|
||||
</table>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-update_extension.php
|
||||
|
||||
Copyright (c) 2015 - 2016 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -40,32 +40,42 @@ if (is_file("{$config['onebuttoninstaller']['rootfolder']}log/oneload")) { requi
|
||||
$return_val = mwexec("fetch -o {$config['onebuttoninstaller']['rootfolder']}log/version.txt https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/version.txt", true);
|
||||
if ($return_val == 0) {
|
||||
$server_version = exec("cat {$config['onebuttoninstaller']['rootfolder']}log/version.txt");
|
||||
if ($server_version != $config['onebuttoninstaller']['version']) { $savemsg = sprintf(gettext("New extension version %s available, push '%s' button to install the new version!"), $server_version, gettext("Update Extension")); }
|
||||
if ($server_version != $config['onebuttoninstaller']['version']) { $savemsg .= sprintf(gettext("New extension version %s available, push '%s' button to install the new version!"), $server_version, gettext("Update Extension")); }
|
||||
mwexec("fetch -o {$config['onebuttoninstaller']['rootfolder']}release_notes.txt https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/release_notes.txt", false);
|
||||
}
|
||||
else { $server_version = gettext("Unable to retrieve version from server!"); }
|
||||
|
||||
if (isset($_POST['ext_remove']) && $_POST['ext_remove']) {
|
||||
// remove start/stop commands
|
||||
if ( is_array($config['rc']['postinit'] ) && is_array( $config['rc']['postinit']['cmd'] ) ) {
|
||||
for ($i = 0; $i < count($config['rc']['postinit']['cmd']);) {
|
||||
if (preg_match('/onebuttoninstaller/', $config['rc']['postinit']['cmd'][$i])) { unset($config['rc']['postinit']['cmd'][$i]);} else{}
|
||||
++$i;
|
||||
}
|
||||
// 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('/onebuttoninstaller/', $config['rc']['postinit']['cmd'][$i])) unset($config['rc']['postinit']['cmd'][$i]);
|
||||
}
|
||||
}
|
||||
if ( is_array($config['rc']['shutdown'] ) && is_array( $config['rc']['shutdown']['cmd'] ) ) {
|
||||
for ($i = 0; $i < count($config['rc']['shutdown']['cmd']); ) {
|
||||
if (preg_match('/onebuttoninstaller/', $config['rc']['shutdown']['cmd'][$i])) { unset($config['rc']['shutdown']['cmd'][$i]); } else {}
|
||||
++$i;
|
||||
if (is_array($config['rc']) && is_array($config['rc']['shutdown']) && is_array( $config['rc']['shutdown']['cmd'])) {
|
||||
$rc_param_count = count($config['rc']['shutdown']['cmd']);
|
||||
for ($i = 0; $i < $rc_param_count; ++$i) {
|
||||
if (preg_match('/onebuttoninstaller/', $config['rc']['shutdown']['cmd'][$i])) unset($config['rc']['shutdown']['cmd'][$i]);
|
||||
}
|
||||
}
|
||||
// remove existing entries for new rc format
|
||||
if (is_array($config['rc']) && is_array($config['rc']['param'])) {
|
||||
$rc_param_count = count($config['rc']['param']);
|
||||
for ($i = 0; $i < $rc_param_count; $i++) {
|
||||
if (preg_match('/onebuttoninstaller/', $config['rc']['param'][$i]['value'])) unset($config['rc']['param'][$i]);
|
||||
}
|
||||
}
|
||||
// remove extension pages
|
||||
mwexec ("rm -rf /usr/local/www/ext/onebuttoninstaller");
|
||||
mwexec ("rm -rf /usr/local/www/onebuttoninstaller*");
|
||||
mwexec("rm -rf /usr/local/www/ext/onebuttoninstaller");
|
||||
mwexec("rmdir -p /usr/local/www/ext"); // to prevent empty extensions menu entry in top GUI menu if there are no other extensions installed
|
||||
mwexec("rm -rf /usr/local/www/onebuttoninstaller*");
|
||||
// unlink created links
|
||||
if (is_link("/usr/local/share/locale-obi")) unlink("/usr/local/share/locale-obi");
|
||||
// remove application section from config.xml
|
||||
if ( is_array($config['onebuttoninstaller'] ) ) { unset( $config['onebuttoninstaller'] ); write_config();}
|
||||
if (is_array($config['onebuttoninstaller'])) unset($config['onebuttoninstaller']);
|
||||
write_config();
|
||||
header("Location:index.php");
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller.php
|
||||
|
||||
Copyright (c) 2015 - 2016 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -82,13 +82,30 @@ function log_get_contents($logfile) {
|
||||
|
||||
function log_get_status($cmd_entry) {
|
||||
global $config;
|
||||
$i =0;
|
||||
if ( is_array($config['rc']['postinit'] ) && is_array( $config['rc']['postinit']['cmd'] ) ) {
|
||||
for ($i; $i < count($config['rc']['postinit']['cmd']);) { if (preg_match("/$cmd_entry/", $config['rc']['postinit']['cmd'][$i])) break; ++$i; }
|
||||
$rc_cmd_entry_found = false;
|
||||
|
||||
if (is_array($config['rc']) && is_array($config['rc']['postinit']) && is_array( $config['rc']['postinit']['cmd'])) { // old rc format
|
||||
$rc_param_count = count($config['rc']['postinit']['cmd']);
|
||||
for ($i = 0; $i < $rc_param_count; $i++) {
|
||||
if (preg_match("/{$cmd_entry}/", $config['rc']['postinit']['cmd'][$i])) {
|
||||
$rc_cmd_entry_found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//echo($cmd_entry." $i - ");
|
||||
if ($i == count($config['rc']['postinit']['cmd'])) return 0; // 0 = no entry, extension is not installed
|
||||
else return 1; // 1 = entry found, extension is already installed
|
||||
|
||||
if (is_array($config['rc']) && is_array($config['rc']['param'])) { // new rc format 11.x
|
||||
$rc_param_count = count($config['rc']['param']);
|
||||
for ($i = 0; $i < $rc_param_count; $i++) {
|
||||
if (preg_match("/{$cmd_entry}/", $config['rc']['param'][$i]['value'])) {
|
||||
$rc_cmd_entry_found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($rc_cmd_entry_found) return 1; // 0 = no entry, extension is not installed
|
||||
else return 0; // 1 = entry found, extension is already installed
|
||||
}
|
||||
|
||||
function log_display($loginfo) {
|
||||
@@ -135,34 +152,30 @@ function log_display($loginfo) {
|
||||
if (!isset($config['onebuttoninstaller']['show_beta']) && (strpos($result[1], "RELEASE") === false)) continue; //check for beta state
|
||||
else {
|
||||
if ($i == count($loginfo['columns']) - 1) {
|
||||
|
||||
|
||||
// check if extension is already installed (existing config.xml or postinit cmd entry)
|
||||
if ((isset($config[$result[2]])) || (log_get_status($result[2]) == 1)) {
|
||||
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'> <img src='{$image_path}status_enabled.png' border='0' alt='' title='".gettext('Enabled')."' /></td>\n";
|
||||
}
|
||||
else { // not installed
|
||||
$supported_app = true;
|
||||
if (!empty($result[6])) { // something unsupported exist
|
||||
$unsupported = explode(",", str_replace(" ", "", $result[6]));
|
||||
for ($k = 0; $k < count($unsupported); $k++) { // check for unsupported release / architecture / platforms
|
||||
if (!check_min_release($unsupported[$k]) || ($unsupported[$k] == $g['arch']) || ($unsupported[$k] == $g['platform'])) {
|
||||
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'> <img src='{$image_path}status_disabled.png' border='0' alt='' title='".gettext('Unsupported architecture/platform/release').': '.$unsupported[$k]."' /></td>\n";
|
||||
$supported_app = false;
|
||||
break;
|
||||
}
|
||||
if (!empty($result[6])) { // something unsupported exist
|
||||
$unsupported = explode(",", str_replace(" ", "", $result[6]));
|
||||
for ($k = 0; $k < count($unsupported); $k++) { // check for unsupported release / architecture / platforms
|
||||
if (!check_min_release($unsupported[$k]) || ($unsupported[$k] == $g['arch']) || ($unsupported[$k] == $g['platform'])) {
|
||||
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'> <img src='{$image_path}status_disabled.png' border='0' alt='' title='".gettext('Unsupported architecture/platform/release').': '.$unsupported[$k]."' /></td>\n";
|
||||
continue 2; // unsupported, therefore we leave and proceed to the next extension in the list
|
||||
}
|
||||
}
|
||||
if ($supported_app === true) {
|
||||
// data for installation
|
||||
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}' title='".gettext('Select to install')."' >
|
||||
<input type='checkbox' name='name[".$j."][extension]' value='".$result[2]."' />
|
||||
<input type='hidden' name='name[".$j."][truename]' value='".$result[0]."' />
|
||||
<input type='hidden' name='name[".$j."][command1]' value='".$result[3]."' />
|
||||
<input type='hidden' name='name[".$j."][command2]' value='".$result[4]."' />
|
||||
</td>\n";
|
||||
}
|
||||
} // EOnot-installed
|
||||
}
|
||||
}
|
||||
// check if extension is already installed (existing config.xml or postinit cmd entry)
|
||||
$already_installed = false;
|
||||
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}' ";
|
||||
if ((isset($config[$result[2]])) || (log_get_status($result[2]) == 1)) {
|
||||
echo "><img src='{$image_path}status_enabled.png' border='0' alt='' title='".gettext('Enabled')."' /";
|
||||
$already_installed = true;
|
||||
}
|
||||
if (($already_installed === false) || isset($config['onebuttoninstaller']['re_install']) ) {
|
||||
// data for installation
|
||||
echo "><input title='".gettext('Select to install')."' type='checkbox' name='name[".$j."][extension]' value='".$result[2]."' />
|
||||
<input type='hidden' name='name[".$j."][truename]' value='".$result[0]."' />
|
||||
<input type='hidden' name='name[".$j."][command1]' value='".$result[3]."' />
|
||||
<input type='hidden' name='name[".$j."][command2]' value='".$result[4]."' />";
|
||||
}
|
||||
echo "</td>\n";
|
||||
} // EOcount
|
||||
else echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'>" . $result[$loginfo['columns'][$i]['pmid']] . "</td>\n";
|
||||
} //EObeta-check
|
||||
@@ -208,7 +221,14 @@ if (isset($_POST['update']) || (isset($config['onebuttoninstaller']['auto_update
|
||||
else $errormsg .= gettext("Unable to retrieve extensions list from server!")."<br />";
|
||||
} // EOupdate
|
||||
|
||||
$return_val = mwexec("fetch -o {$config['onebuttoninstaller']['rootfolder']}log/version.txt https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/version.txt", false);
|
||||
if ($return_val == 0) {
|
||||
$server_version = exec("cat {$config['onebuttoninstaller']['rootfolder']}log/version.txt");
|
||||
if ($server_version != $config['onebuttoninstaller']['version']) { $savemsg .= sprintf(gettext("New extension version %s available, push '%s' button to install the new version!"), $server_version, gettext("Maintenance")); }
|
||||
} //EOversion-check
|
||||
|
||||
if (!is_file("{$config['onebuttoninstaller']['rootfolder']}extensions.txt")) $errormsg .= sprintf(gettext("File %s not found!"), "{$config['onebuttoninstaller']['rootfolder']}extensions.txt")."<br />";
|
||||
if (isset($config['onebuttoninstaller']['re_install'])) $savemsg .= sprintf(gettext("Option '%s' in '%s' is enabled!"), gettext("Re-install"), gettext("Configuration"));
|
||||
|
||||
bindtextdomain("nas4free", "/usr/local/share/locale"); // to get the right main menu language
|
||||
include("fbegin.inc");
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
Extended GUI###<font color="green">RELEASE<br>0.5.3</font>###extended-gui###mkdir -p extended-gui/backup && mkdir -p extended-gui/log && cd extended-gui && fetch https://raw.github.com/crestAT/nas4free-extended-gui/master/extended-gui/extended-gui-install.php && chmod 770 extended-gui*install.php###extended-gui/extended-gui-install.php###Extension for NAS4Free with several improvements for the WebGUI and additional functions. Most of the extension affects STATUS | SYSTEM view but also STATUS | GRAPH and DIAGNOSTICS | LOG which got a new entry NOTIFICATIONS.<br><br>The extension works on all plattforms (x86 & x64, ARM, embedded & full), does not need jail or pkg_add, enhance pages of the NAS4Free WebGUI, features configuration and extension maintenance (update & removal inside the WebGUI), let you switch between STANDARD (original) and EXTENDED WebGUI view and let you easily configure/enable/disable views and additional functions.<br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=6405' target='_blank'>NAS4Free Forum</a>###10.3032853###
|
||||
RRDGraphs###<font color="green">RELEASE<br>0.3.2</font>###rrdgraphs###mkdir -p rrdgraphs && cd rrdgraphs && fetch https://raw.github.com/crestAT/nas4free-rrdtool/master/rrdgraphs/rrd-install.php && chmod 770 rrd*install.php###rrdgraphs/rrd-install.php###Extension to install / configure / update and remove RRDTool based graphs for NAS4Free servers.<br><br>The extension is based on RRDtool and provides graphs for CPU frequency, CPU temperature, CPU usage, Disk usage (recognition of all mountpoints/shares automatically at RRDG startup), Load averages, Memory usage, Network latency, Network traffic, Processes, UPS, Uptime and ZFS ARC.<br><br>The extension is compatible with all versions (9.1.x - 10.x) of NAS4Free except on ARM boxes and works on all plattforms (x86 & x64, embedded & full), does not need jail or pkg_add, add pages to NAS4Free Web GUI extensions, features configuration and extension maintenance (update & removal inside the WebGUI) and is able to work on RAM drives to take care of your HDDs/USB pen drives.<br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=8299' target='_blank'>NAS4Free Forum</a>###-###
|
||||
BitTorrent Sync###<font color="green">RELEASE<br>0.7</font>###btsync###fetch https://raw.github.com/crestAT/nas4free-bittorrent-sync/master/bts-install.php && chmod 770 bts*install.php###bts-install.php###Extension to install / configure / backup / update / manage and remove BitTorrent Sync application on NAS4Free servers.<br><br>The extension can be used with BitTorrent Sync 1.4.x (last version was 1.4.111) as well as 2.x, is compatible with all versions (9.1.x - 10.x) of NAS4Free except on ARM boxes, works on all plattforms (embedded, full), does not need jail or pkg_add, add pages to NAS4Free Web GUI extensions, features configuration, application update & backup management, extension mantenance (update & removal) and log view with filter and search capability.<br><br><font color="blue"><b>Note:</b> Standard BitTorrent Sync version is based on 2.x releases, to use the latest 1.x release open Extensions | BitTorrent Sync | Maintenance and change the Download URL for version <b>1.4.111:</b><br><b>64 bit: </b>http://syncapp.bittorrent.com/1.4.111/btsync_freebsd_x64-1.4.111.tar.gz<br><b>32 bit: </b>http://syncapp.bittorrent.com/1.4.111/btsync_freebsd_i386-1.4.111.tar.gz<br>and hit Save URL, Fetch and Install.</font><br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=5704' target='_blank'>NAS4Free Forum</a>###rpi, rpi2, rpi3, bananapi###
|
||||
Syncthing###<font color="green">RELEASE<br>0.1.5</font>###syncthing_start.php###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 NAS4Free (N4F) servers.<br><br>The extension works on all plattforms, does not need jail or pkg_add, add pages to NAS4Free 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 10.2 series of NAS4Free contain Syncthing already out of the box so this extensions is mainly for older releases OR if one need older Syncthing versions (e.g. before 0.14.x for compatibility reasons with other devices.</font><br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=11110#p69469' target='_blank'>NAS4Free Forum</a>###-###
|
||||
TheBrig###<font color="green">RELEASE<br>0.94</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 NAS4Free.<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='http://forums.nas4free.org/viewtopic.php?f=79&t=3894' target='_blank'>NAS4Free Forum</a>###-###
|
||||
Extended GUI###<font color="green">RELEASE<br>0.6.x</font>###extended-gui###mkdir -p extended-gui/backup && mkdir -p extended-gui/log && cd extended-gui && fetch https://raw.github.com/crestAT/nas4free-extended-gui/master/extended-gui/extended-gui-install.php && chmod 770 extended-gui*install.php###extended-gui/extended-gui-install.php###Extension for NAS4Free with several improvements for the WebGUI and additional functions. Most of the extension affects STATUS | SYSTEM view but also DIAGNOSTICS | LOG (which got a new entry NOTIFICATIONS).<br><br><font color="blue">PLEASE NOTE: Extended GUI versions older then v0.5.3 should be uninstalled and v0.6.x afterwards newly installed!</font><br><br>The extension works on all plattforms (x86 & x64, ARM, embedded & full), does not need jail or pkg_add, enhance pages of the NAS4Free WebGUI, features configuration and extension maintenance (update & removal inside the WebGUI), let you switch between STANDARD (original) and EXTENDED WebGUI view and let you easily configure/enable/disable views and additional functions.<br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=6405' target='_blank'>NAS4Free Forum</a>###10.3032853###
|
||||
RRDGraphs###<font color="green">RELEASE<br>0.3.3</font>###rrdgraphs###mkdir -p rrdgraphs && cd rrdgraphs && fetch https://raw.github.com/crestAT/nas4free-rrdtool/master/rrdgraphs/rrd-install.php && chmod 770 rrd*install.php###rrdgraphs/rrd-install.php###Extension to install / configure / update and remove RRDTool based graphs for NAS4Free servers.<br><br>The extension is based on RRDtool and provides graphs for CPU frequency, CPU temperature, CPU usage, Disk usage (recognition of all mountpoints/shares automatically at RRDG startup), Load averages, Memory usage, Network latency, Network traffic, Processes, UPS, Uptime and ZFS ARC.<br><br><b><font color="red">Version 0.3.3 will be the last update for the RRDGraphs Extension since RRDGraphs goes to be native in NAS4Free 11.x series. This v0.3.3 was the base for the native implementation and all statistical data from the extension can be used further in the native NAS4Free implementation which will be called Monitoring and is located under System > Advanced. A description for the transition to native RRDGraphs can be found in the NAS4Free forum.</font></b><br><br>The extension is compatible with all versions up to 10.3 of NAS4Free and works on all plattforms (x86 & x64, embedded & full), does not need jail or pkg_add, add pages to NAS4Free Web GUI extensions, features configuration and extension maintenance (update & removal inside the WebGUI) and is able to work on RAM drives to take care of your HDDs/USB pen drives.<br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=8299' target='_blank'>NAS4Free Forum</a>###-###
|
||||
BitTorrent Sync###<font color="green">RELEASE<br>0.7.x</font>###btsync###fetch https://raw.github.com/crestAT/nas4free-bittorrent-sync/master/bts-install.php && chmod 770 bts*install.php###bts-install.php###Extension to install / configure / backup / update / manage and remove BitTorrent Sync application on NAS4Free servers.<br><br>The extension is compatible with all versions (9.1.x - 11.x) of NAS4Free except on ARM boxes, works on all plattforms (embedded, full), does not need jail or pkg_add, add pages to NAS4Free Web GUI extensions, features configuration, application update & backup management, extension mantenance (update & removal) and log view with filter and search capability.<br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=5704' target='_blank'>NAS4Free Forum</a>###rpi, rpi2, rpi3, bananapi###
|
||||
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 NAS4Free (N4F) servers.<br><br>The extension works on all plattforms, does not need jail or pkg_add, add pages to NAS4Free 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 NAS4Free 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 NAS4Free 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 NAS4Free.<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='http://forums.nas4free.org/viewtopic.php?f=79&t=3894' target='_blank'>NAS4Free Forum</a>###10.3###
|
||||
DNSMasq DHCP Server###<font color="green">RELEASE<br>0.3</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 NAS4Free.<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='http://forums.nas4free.org/viewtopic.php?f=71&t=3002' target='_blank'>NAS4Free 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/mcommander.* . && chmod u+x mcommander.sh && `pwd`/mcommander.sh###midnightcommander/mcommander.postinit###Midnight Commander for NAS4Free.<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='http://forums.nas4free.org/viewtopic.php?f=70&t=187' target='_blank'>NAS4Free Forum</a>###rpi, rpi2, rpi3, bananapi###
|
||||
Virtual Machine BHYVE###<font color="red">BETA<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 NAS4Free. 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='http://forums.nas4free.org/viewtopic.php?f=71&t=10433#p65157' target='_blank'>NAS4Free Forum</a>###x86, 10.2, rpi, rpi2, rpi3, bananapi###
|
||||
Plex Media Server###<font color="green">RELEASE<br>4.1</font>###plexinit###mkdir -p plex && cd plex && fetch https://raw.githubusercontent.com/JRGTH/nas4free-plex-extension/master/plex/plexinit && chmod 755 plexinit && ./plexinit -o###plex/postinit###Plex Media Server Add-On for NAS4Free 10.x.<br><br>The extension works on NAS4Free Plex Media Server Add-On for NAS4Free 10.x or compatible FreeBSD based NAS solutions, 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 actual Plex config, Plex IP address will be locally visible by any devices.<br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=11184#p69861' target='_blank'>NAS4Free Forum</a>###x86, 10.0, rpi, rpi2, rpi3, bananapi###
|
||||
Plex Media Server###<font color="green">RELEASE<br>4.2.x</font>###plexinit###mkdir -p plex && cd plex && fetch https://raw.githubusercontent.com/JRGTH/nas4free-plex-extension/master/plex/plexinit && chmod +x plexinit && ./plexinit -o###plex/postinit###Plex Media Server Add-On for NAS4Free 10.3 and later.<br><br>The extension works on NAS4Free 10.3 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 actual Plex config, Plex IP address will be locally visible by any devices.<br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=11184#p69861' target='_blank'>NAS4Free 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 NAS4Free WebGUI, works on all plattforms (x86 & x64, ARM, embedded & full), does not need jail or pkg_add, enhance pages of the NAS4Free 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='http://forums.nas4free.org/' target='_blank'>NAS4Free Forum</a>
|
||||
NextOnwCloud###<font color="green">RELEASE<br>0.2.x</font>###owncloud###mkdir -p owncloud && cd owncloud && fetch https://raw.github.com/crestAT/nas4free-owncloud/master/owncloud/owncloud-install.php && chmod 770 owncloud*install.php && echo "Installation file successfully downloaded"###owncloud/owncloud-install.php###Extension to install OwnCloud and/or NextCloud with a minimal set of prerequisites (ensures to have the right permissions on the used paths and an upload file size of 2GB) on NAS4Free servers.<br><br>The extension works on all plattforms, does not need jail or pkg_add and add pages to NAS4Free WebGUI extensions.<br><font color="blue"><b>At the moment no SQL database system will be installed so the NAS4Free built-in SQLite or an existing mySQL or MariaDB installation can be used.</b></font><br><br>Read more ... <a href='http://forums.nas4free.org/' target='_blank'>NAS4Free Forum</a>
|
||||
Extended GUI###<font color="red">BETA<br>0.6.1-beta1</font>###extended-gui-061b1###mkdir -p extended-gui/backup && mkdir -p extended-gui/log && cd extended-gui && fetch https://raw.github.com/crestAT/nas4free-extended-gui/development/extended-gui/extended-gui-install.php && chmod 770 extended-gui*install.php###extended-gui/extended-gui-install.php###BETA Version.<br><br><font color="blue">CHANGES:<br>C: index.php: Page base: 3400<br>N: Extended GUI | TOOLS: new section => User Defined Files<br>N: Extended GUI | TOOLS: inclusion of user defined action buttons definitions file for STATUS | SYSTEM implemented<br>N: Extended GUI | TOOLS: inclusion of user defined logs definitions file for DIAGNOSE | LOG implemented<br>N: Extended GUI | TOOLS: logs & button samples (UPS and Webserver log, Plex Start/Stop example action buttons)<br>N: STATUS | SYSTEM: user defined action buttons implemented<br>N: DIAGNOSE | LOG: user defined logs implemented<br>N: Swedish translation<br>N: Ukrainian translation<br>C: updated German translation<br>C: STATUS | SYSTEM: CPU multicore display as in NAS4Free release 3330<br>F: STATUS | SYSTEM: SSD Lifetime for Intel SSDs => http://forums.nas4free.org/viewtopic.php?f=71&t=6405&p=74468#p74321<br>F: STATUS | SYSTEM: empty CPU and LAN graphs => http://forums.nas4free.org/viewtopic.php?f=71&t=6405&p=74468#p74321</font><br><br><font color="red"><b>Note 1:</b> THIS BETA VERSION SHOWS NEVER TO BE INSTALLED THUS IT IS POSSIBLE TO INSTALL NEWER BETA VERSIONS!</font><br><font color="blue"><b>Note 2:</b> One can revert to the most recent release of eGUI at any time via the WebGUI | Extensions | Extended GUI | Extension Maintenance => Update extension.</font><br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=6405' target='_blank'>NAS4Free Forum</a>###10.3032853###
|
||||
|
||||
@@ -1 +1 @@
|
||||
c143308bd6f18d8d4c42c1daaab553cb1eeadca1e89db29909b93dfb80b0dc69ed5ea3e5cc91813f3598a9edf414750a101e2a0449d945eedeb448f1252a6132
|
||||
6edc875a783fa2cb42d0984c2dfc168bb0530acc54900c1ab8f3cedcdc3160bec2a9ac11ba95327899ea829a689309808209ccbbc2428efbdda4aff0034c0b0f
|
||||
|
||||
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.
BIN
onebuttoninstaller/locale-obi/sv/LC_MESSAGES/nas4free.mo
Normal file
BIN
onebuttoninstaller/locale-obi/sv/LC_MESSAGES/nas4free.mo
Normal file
Binary file not shown.
BIN
onebuttoninstaller/locale-obi/tr/LC_MESSAGES/nas4free.mo
Normal file
BIN
onebuttoninstaller/locale-obi/tr/LC_MESSAGES/nas4free.mo
Normal file
Binary file not shown.
BIN
onebuttoninstaller/locale-obi/uk/LC_MESSAGES/nas4free.mo
Normal file
BIN
onebuttoninstaller/locale-obi/uk/LC_MESSAGES/nas4free.mo
Normal file
Binary file not shown.
BIN
onebuttoninstaller/locale-obi/zh_CN/LC_MESSAGES/nas4free.mo
Normal file
BIN
onebuttoninstaller/locale-obi/zh_CN/LC_MESSAGES/nas4free.mo
Normal file
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-install.php
|
||||
|
||||
Copyright (c) 2015 - 2016 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,7 +29,7 @@
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
$v = "v0.2"; // extension version
|
||||
$v = "v0.3.4.1"; // extension version
|
||||
$appname = "OneButtonInstaller";
|
||||
|
||||
require_once("config.inc");
|
||||
@@ -75,46 +75,68 @@ else {
|
||||
}
|
||||
|
||||
// install / update application on NAS4Free
|
||||
if ( !isset($config['onebuttoninstaller']) || !is_array($config['onebuttoninstaller'])) {
|
||||
// new installation
|
||||
$config['onebuttoninstaller'] = array();
|
||||
$config['onebuttoninstaller']['appname'] = $appname;
|
||||
$config['onebuttoninstaller']['version'] = exec("cat {$install_dir}version.txt");
|
||||
$config['onebuttoninstaller']['rootfolder'] = $install_dir;
|
||||
$i = 0;
|
||||
if ( is_array($config['rc']['postinit'] ) && is_array( $config['rc']['postinit']['cmd'] ) ) {
|
||||
for ($i; $i < count($config['rc']['postinit']['cmd']);) {
|
||||
if (preg_match('/onebuttoninstaller/', $config['rc']['postinit']['cmd'][$i])) break; ++$i; }
|
||||
if (!isset($config['onebuttoninstaller']) || !is_array($config['onebuttoninstaller'])) $config['onebuttoninstaller'] = array();
|
||||
$config['onebuttoninstaller']['appname'] = $appname;
|
||||
$config['onebuttoninstaller']['version'] = exec("cat {$install_dir}version.txt");
|
||||
$config['onebuttoninstaller']['rootfolder'] = $install_dir;
|
||||
|
||||
// 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('/onebuttoninstaller/', $config['rc']['postinit']['cmd'][$i])) unset($config['rc']['postinit']['cmd'][$i]);
|
||||
}
|
||||
$config['rc']['postinit']['cmd'][$i] = $config['onebuttoninstaller']['rootfolder']."onebuttoninstaller_start.php";
|
||||
$i =0;
|
||||
if ( is_array($config['rc']['shutdown'] ) && is_array( $config['rc']['shutdown']['cmd'] ) ) {
|
||||
for ($i; $i < count($config['rc']['shutdown']['cmd']); ) {
|
||||
if (preg_match('/onebuttoninstaller/', $config['rc']['shutdown']['cmd'][$i])) break; ++$i; }
|
||||
}
|
||||
if (is_array($config['rc']) && is_array($config['rc']['shutdown']) && is_array( $config['rc']['shutdown']['cmd'])) {
|
||||
$rc_param_count = count($config['rc']['shutdown']['cmd']);
|
||||
for ($i = 0; $i < $rc_param_count; ++$i) {
|
||||
if (preg_match('/onebuttoninstaller/', $config['rc']['shutdown']['cmd'][$i])) unset($config['rc']['shutdown']['cmd'][$i]);
|
||||
}
|
||||
$config['rc']['shutdown']['cmd'][$i] = $config['onebuttoninstaller']['rootfolder']."onebuttoninstaller_stop.php";
|
||||
write_config();
|
||||
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-start.php");
|
||||
}
|
||||
// remove existing entries for new rc format
|
||||
if (is_array($config['rc']) && is_array($config['rc']['param'])) {
|
||||
$rc_param_count = count($config['rc']['param']);
|
||||
for ($i = 0; $i < $rc_param_count; $i++) {
|
||||
if (preg_match('/onebuttoninstaller/', $config['rc']['param'][$i]['value'])) unset($config['rc']['param'][$i]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($release[0] >= 11.0) { // new rc format
|
||||
// postinit command
|
||||
$rc_param = [];
|
||||
$rc_param['uuid'] = uuid();
|
||||
$rc_param['name'] = "{$appname} Extension";
|
||||
$rc_param['value'] = "/usr/local/bin/php-cgi -f {$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-start.php";
|
||||
$rc_param['comment'] = "Start {$appname} Extension";
|
||||
$rc_param['typeid'] = '2';
|
||||
$rc_param['enable'] = true;
|
||||
if (!is_array($config['rc'])) $config['rc'] = [];
|
||||
if (!is_array($config['rc']['param'])) $config['rc']['param'] = [];
|
||||
$config['rc']['param'][] = $rc_param;
|
||||
$config['onebuttoninstaller']['rc_uuid_start'] = $rc_param['uuid'];
|
||||
|
||||
unset($rc_param);
|
||||
/* shutdown command */
|
||||
$rc_param = [];
|
||||
$rc_param['uuid'] = uuid();
|
||||
$rc_param['name'] = "{$appname} Extension";
|
||||
$rc_param['value'] = "/usr/local/bin/php-cgi -f {$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-stop.php";
|
||||
$rc_param['comment'] = "Stop {$appname} Extension";
|
||||
$rc_param['typeid'] = '3';
|
||||
$rc_param['enable'] = true;
|
||||
if (!is_array($config['rc'])) $config['rc'] = [];
|
||||
if (!is_array($config['rc']['param'])) $config['rc']['param'] = [];
|
||||
$config['rc']['param'][] = $rc_param;
|
||||
$config['onebuttoninstaller']['rc_uuid_stop'] = $rc_param['uuid'];
|
||||
}
|
||||
else {
|
||||
// update release
|
||||
$config['onebuttoninstaller']['version'] = exec("cat {$install_dir}version.txt");
|
||||
$config['onebuttoninstaller']['rootfolder'] = $install_dir;
|
||||
$i = 0;
|
||||
if ( is_array($config['rc']['postinit'] ) && is_array( $config['rc']['postinit']['cmd'] ) ) {
|
||||
for ($i; $i < count($config['rc']['postinit']['cmd']);) {
|
||||
if (preg_match('/onebuttoninstaller/', $config['rc']['postinit']['cmd'][$i])) break; ++$i; }
|
||||
}
|
||||
$config['rc']['postinit']['cmd'][$i] = $config['onebuttoninstaller']['rootfolder']."onebuttoninstaller_start.php";
|
||||
$i =0;
|
||||
if ( is_array($config['rc']['shutdown'] ) && is_array( $config['rc']['shutdown']['cmd'] ) ) {
|
||||
for ($i; $i < count($config['rc']['shutdown']['cmd']); ) {
|
||||
if (preg_match('/onebuttoninstaller/', $config['rc']['shutdown']['cmd'][$i])) break; ++$i; }
|
||||
}
|
||||
$config['rc']['shutdown']['cmd'][$i] = $config['onebuttoninstaller']['rootfolder']."onebuttoninstaller_stop.php";
|
||||
write_config();
|
||||
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-start.php");
|
||||
$config['rc']['postinit']['cmd'][] = "/usr/local/bin/php-cgi -f {$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-start.php";
|
||||
$config['rc']['shutdown']['cmd'][] = "/usr/local/bin/php-cgi -f {$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-stop.php";
|
||||
}
|
||||
|
||||
write_config();
|
||||
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-start.php");
|
||||
// finally fetch the most recent extensions list to get the latest changes if not already in the master release
|
||||
$return_val = mwexec("fetch -o {$config['onebuttoninstaller']['rootfolder']}extensions.txt https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/extensions.txt", true);
|
||||
?>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-start.php
|
||||
|
||||
Copyright (c) 2015 - 2016 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,6 +29,8 @@
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
require_once("config.inc");
|
||||
|
||||
$extension_dir = "/usr/local/www";
|
||||
|
||||
mwexec("ln -sf {$config['onebuttoninstaller']['rootfolder']}locale-obi /usr/local/share/", true); // create link to languages
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-stop.php
|
||||
|
||||
Copyright (c) 2015 - 2016 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,8 +29,12 @@
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
require_once("config.inc");
|
||||
|
||||
$extension_dir = "/usr/local/www";
|
||||
|
||||
mwexec("rm -Rf {$extension_dir}/onebuttoninstaller*", true);
|
||||
mwexec("rm -Rf {$extension_dir}/ext/onebuttoninstaller", true);
|
||||
exec("logger onebuttoninstaller: stopped");
|
||||
if (is_link("/usr/local/share/locale-obi")) unlink("/usr/local/share/locale-obi");
|
||||
exec("logger onebuttoninstaller: stopped");
|
||||
?>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/local/bin/php-cgi -f
|
||||
<?php
|
||||
require_once("config.inc");
|
||||
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-start.php");
|
||||
?>
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/local/bin/php-cgi -f
|
||||
<?php
|
||||
require_once("config.inc");
|
||||
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-stop.php");
|
||||
?>
|
||||
@@ -1,7 +1,39 @@
|
||||
Version Date Description
|
||||
0.2 2016.08.09 N: configuration - enable/disable beta releases in extensions list
|
||||
0.3.4.1 2017.02.17 F: installation fails on vanilla systems => http://forums.nas4free.org/viewtopic.php?f=71&t=11189&p=75515#p75357
|
||||
|
||||
0.3.4 2016.11.23 N: command scripts rc format for NAS4Free 11.x compatibility
|
||||
N: MidnightCommander: command scripts rc format for NAS4Free 11.x compatibility
|
||||
N: Chinese (Simplified) translation
|
||||
C: update Dutch translation
|
||||
C: update Italian translation
|
||||
C: update Romanian translation
|
||||
C: update Spanish translation
|
||||
C: update Ukrainian translation
|
||||
C: MidnightCommander: symlinks for NAS4Free 11.x compatibility
|
||||
|
||||
0.3.3 2016.09.01 N: Turkish translation
|
||||
N: Ukrainian translation
|
||||
C: update Dutch translation
|
||||
C: update French translation
|
||||
C: update Greek translation
|
||||
C: update Russian translation
|
||||
C: update Spanish translation
|
||||
C: update Swedish translation
|
||||
F: Configuration - fix table view if unsupported extension exists
|
||||
|
||||
0.3.2 2016.08.25 N: Configuration - add checkbox to enable the installation of extensions even if they are already installed
|
||||
N: Swedish translation
|
||||
C: update Greek translation
|
||||
C: update German translation
|
||||
0.3.1 2016.08.15 F: OBI installer - add checkbox to override restriction for extensions installation path
|
||||
|
||||
0.3 2016.08.14 N: Configuration - checkbox to override restriction for extensions installation path
|
||||
(limited to a directory under /mnt/)
|
||||
|
||||
0.2 2016.08.09 N: Configuration - enable/disable beta releases in extensions list
|
||||
N: check hardware platform to use midnightcommander on i386 too
|
||||
F: disabling extension not possible, leads to an error message
|
||||
|
||||
0.1 2016.08.01 initial release
|
||||
|
||||
N: ... new feature
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.2
|
||||
0.3.4.1
|
||||
|
||||
Reference in New Issue
Block a user