forked from Mirrors/nas4free-onebuttoninstaller
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
535e73b3b4 | ||
|
|
98f5593f45 | ||
|
|
513cec5256 | ||
|
|
a4d27c34c3 | ||
|
|
850a73a0b4 | ||
|
|
4c5ea3ab16 | ||
|
|
8e15be5ad5 | ||
|
|
c4fd186662 | ||
|
|
35b9cee955 | ||
|
|
eae7031298 | ||
|
|
f0d035866a | ||
|
|
d71d4b77a6 | ||
|
|
33aad8d171 | ||
|
|
c9dcb9e1c6 | ||
|
|
ad45a13fb9 | ||
|
|
a7807fd115 | ||
|
|
a7166fcb33 | ||
|
|
9431f59704 | ||
|
|
7b15775f15 | ||
|
|
cd7b98b5ae |
25
LICENSE.txt
Normal file
25
LICENSE.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2015 - 2018 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:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* 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 HOLDER 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.
|
||||
12
OBI.php
12
OBI.php
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
OBI.php
|
||||
|
||||
Copyright (c) 2015 - 2016 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -24,10 +24,6 @@
|
||||
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("auth.inc");
|
||||
require("guiconfig.inc");
|
||||
@@ -37,6 +33,10 @@ $pgtitle = array(gettext("Extensions"), gettext($application), gettext("Configur
|
||||
|
||||
if (!isset($config['onebuttoninstaller']) || !is_array($config['onebuttoninstaller'])) $config['onebuttoninstaller'] = array();
|
||||
|
||||
$platform = $g['platform'];
|
||||
if ($platform == "livecd" || $platform == "liveusb")
|
||||
$input_errors[] = sprintf(gettext("Attention: the used XigmaNAS platform '%s' is not recommended for extensions! After a reboot all extensions will no longer be available, use XigmaNAS embedded or full platform instead!"), $platform);
|
||||
|
||||
/* Check if the directory exists, the mountpoint has at least o=rx permissions and
|
||||
* set the permission to 775 for the last directory in the path
|
||||
*/
|
||||
@@ -85,7 +85,7 @@ if (isset($_POST['save']) && $_POST['save']) {
|
||||
$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);
|
||||
$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'", false);
|
||||
if ($return_val == 0) {
|
||||
chmod("{$install_dir}onebuttoninstaller/onebuttoninstaller-install.php", 0775);
|
||||
require_once("{$install_dir}onebuttoninstaller/onebuttoninstaller-install.php");
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
OneButtonInstaller
|
||||
------------------
|
||||
|
||||
Description in the NAS4Free forum -> <a href="http://forums.nas4free.org/viewtopic.php?f=71&t=11189">OneButtonInstaller</a>
|
||||
|
||||
Please visit the XigmaNAS forum for full description and installation guide -> <a href="https://www.xigmanas.com/forums/viewtopic.php?f=71&t=11189">OneButtonInstaller</a>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
fail2ban.postinit
|
||||
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -24,10 +24,6 @@
|
||||
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";
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/*
|
||||
mcommander.postinnit
|
||||
universal postinit file for CLI extensions
|
||||
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -24,14 +24,11 @@
|
||||
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");
|
||||
|
||||
$appName = "Midnight Commander";
|
||||
$command = "mcommander.sh";
|
||||
$cmd = dirname(__FILE__)."/".$command;
|
||||
|
||||
@@ -58,9 +55,9 @@ if ($release[0] >= 11.0) { // new rc format
|
||||
// postinit command
|
||||
$rc_param = [];
|
||||
$rc_param['uuid'] = uuid();
|
||||
$rc_param['name'] = "MidnightCommander Extension";
|
||||
$rc_param['name'] = "{$appName} Extension";
|
||||
$rc_param['value'] = "{$cmd}";
|
||||
$rc_param['comment'] = "Start MidnightCommander";
|
||||
$rc_param['comment'] = "Start {$appName}";
|
||||
$rc_param['typeid'] = '2';
|
||||
$rc_param['enable'] = true;
|
||||
$config['rc']['param'][] = $rc_param;
|
||||
69
onebuttoninstaller/apps/ncdu.postinit
Normal file
69
onebuttoninstaller/apps/ncdu.postinit
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/*
|
||||
universal postinit file for CLI extensions
|
||||
|
||||
Copyright (c) 2015 - 2018 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 = "NCurses Disk Usage";
|
||||
$command = "ncdu.sh";
|
||||
$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'] = "{$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}";
|
||||
}
|
||||
write_config();
|
||||
?>
|
||||
45
onebuttoninstaller/apps/ncdu.sh
Normal file
45
onebuttoninstaller/apps/ncdu.sh
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
# filename: ncdu.sh
|
||||
# author: Graham Inggs
|
||||
# date: 2018-05-24 ; Initial release for NAS4Free 11.1.0.4
|
||||
# purpose: Install NCurses Disk Usage (ncdu) on NAS4Free (embedded version).
|
||||
# Note: Check the end of the page.
|
||||
#
|
||||
#----------------------- Set variables ------------------------------------------------------------------
|
||||
DIR=`dirname $0`;
|
||||
PLATFORM=`uname -m`
|
||||
RELEASE=`uname -r | cut -d- -f1`
|
||||
REL_MAJOR=`echo $RELEASE | cut -d. -f1`
|
||||
REL_MINOR=`echo $RELEASE | cut -d. -f2`
|
||||
#URL="http://distcache.freebsd.org/FreeBSD:${REL_MAJOR}:${PLATFORM}/release_${REL_MINOR}/All"
|
||||
URL="http://distcache.freebsd.org/FreeBSD:${REL_MAJOR}:${PLATFORM}/release_1/All"
|
||||
NCDUFILE="ncdu-1.12.txz"
|
||||
#----------------------- Set Errors ---------------------------------------------------------------------
|
||||
_msg() { case $@ in
|
||||
0) echo "The script will exit now."; exit 0 ;;
|
||||
1) echo "No route to server, or file do not exist on server"; _msg 0 ;;
|
||||
2) echo "Can't find ${FILE} on ${DIR}"; _msg 0 ;;
|
||||
3) echo "NCurses Disk Usage installed and ready! (ONLY USE DURING A SSH SESSION)"; exit 0 ;;
|
||||
4) echo "Always run this script using the full path: /mnt/.../directory/ncdu.sh"; _msg 0 ;;
|
||||
esac ; exit 0; }
|
||||
#----------------------- Check for full path ------------------------------------------------------------
|
||||
if [ ! `echo $0 |cut -c1-5` = "/mnt/" ]; then _msg 4; fi
|
||||
cd $DIR;
|
||||
#----------------------- Download and decompress ncdu files if needed -----------------------------------
|
||||
FILE=${NCDUFILE}
|
||||
if [ ! -d ${DIR}/usr/local/bin ]; then
|
||||
if [ ! -e ${DIR}/${FILE} ]; then fetch ${URL}/${FILE} || _msg 1; fi
|
||||
if [ -f ${DIR}/${FILE} ]; then tar xzf ${DIR}/${FILE} || _msg 2;
|
||||
rm ${DIR}/+*; rm -R ${DIR}/usr/local/man; rm -R ${DIR}/usr/local/share; fi
|
||||
if [ ! -d ${DIR}/usr/local/bin ] ; then _msg 4; fi
|
||||
fi
|
||||
#----------------------- Create symlinks ----------------------------------------------------------------
|
||||
for i in `ls $DIR/usr/local/bin/`
|
||||
do if [ ! -e /usr/local/bin/${i} ]; then ln -s ${DIR}/usr/local/bin/$i /usr/local/bin; fi; done
|
||||
_msg 3 ; exit 0;
|
||||
#----------------------- End of Script ------------------------------------------------------------------
|
||||
# 1. Keep this script in its own directory.
|
||||
# 2. chmod the script u+x,
|
||||
# 3. Always run this script using the full path: /mnt/.../directory/ncdu.sh
|
||||
# 4. You can add this script to WebGUI: Advanced: Command Scripts as a PostInit command (see 3).
|
||||
# 5. To run Ncurses Disk Usage from shell type 'ncdu'.
|
||||
208
onebuttoninstaller/ext/extension-lib.inc
Normal file
208
onebuttoninstaller/ext/extension-lib.inc
Normal file
@@ -0,0 +1,208 @@
|
||||
<?php
|
||||
/*
|
||||
extension-lib.inc
|
||||
|
||||
Copyright (c) 2016 - 2018 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.
|
||||
*/
|
||||
|
||||
$extension_lib_version = "1.2";
|
||||
/* Version history:
|
||||
* 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_check_release
|
||||
* checks current release against a minimal neccessary release
|
||||
* params:
|
||||
* $min_release: a float string to compare with the current used release, e.g.: 9.3, 10.3.0.3.2853 => 10.3032853, 11.0
|
||||
* return:
|
||||
* true => current release >= minimal release
|
||||
* false => current release < minimal release
|
||||
*/
|
||||
if (!function_exists('ext_check_release')) {
|
||||
function ext_check_release($min_release) {
|
||||
global $config;
|
||||
$product_version = explode(".", get_product_version()); // p.version = 10.3.0.3, p.revision = 2853
|
||||
$current_release = $product_version[0].".".$product_version[1].$product_version[2].$product_version[3].get_product_revision();
|
||||
if ($current_release < floatval($min_release)) return false; // release not supported
|
||||
else return true; // release supported
|
||||
}
|
||||
}
|
||||
|
||||
/* function ext_create_rc_commands
|
||||
* params:
|
||||
* $appname: extension name
|
||||
* $postinit: postinit command
|
||||
* $shutdown: shutdown command
|
||||
* $start_action: comment e.g. Start, Run, Initialize
|
||||
* $stop_action: comment e.g. Stop, Closedown
|
||||
* return:
|
||||
* $postinit: uuid or false
|
||||
* $shutdown: uuid or false
|
||||
*/
|
||||
if (!function_exists('ext_create_rc_commands')) {
|
||||
function ext_create_rc_commands($appname, &$postinit = false, &$shutdown = false, $start_action = "Start", $stop_action = "Stop") {
|
||||
global $config;
|
||||
if (ext_check_release(11.0)) { // new rc format
|
||||
unset($rc_param);
|
||||
// postinit command
|
||||
if (($postinit !== false) && !empty($postinit)) {
|
||||
$rc_param = [];
|
||||
$rc_param['uuid'] = uuid();
|
||||
$rc_param['name'] = "{$appname} Extension";
|
||||
$rc_param['value'] = $postinit;
|
||||
$rc_param['comment'] = "{$start_action} {$appname}";
|
||||
$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;
|
||||
$postinit = $rc_param['uuid'];
|
||||
unset($rc_param);
|
||||
}
|
||||
// shutdown command
|
||||
if (($shutdown !== false) && !empty($shutdown)) {
|
||||
$rc_param = [];
|
||||
$rc_param['uuid'] = uuid();
|
||||
$rc_param['name'] = "{$appname} Extension";
|
||||
$rc_param['value'] = $shutdown;
|
||||
$rc_param['comment'] = "{$stop_action} {$appname}";
|
||||
$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;
|
||||
$shutdown = $rc_param['uuid'];
|
||||
unset($rc_param);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (($postinit !== false) && !empty($postinit)) {
|
||||
$config['rc']['postinit']['cmd'][] = $postinit;
|
||||
$postinit = false;
|
||||
}
|
||||
if (($shutdown !== false) && !empty($shutdown)) {
|
||||
$config['rc']['shutdown']['cmd'][] = $shutdown;
|
||||
$shutdown = false;
|
||||
}
|
||||
}
|
||||
write_config();
|
||||
}
|
||||
}
|
||||
|
||||
/* function ext_remove_rc_commands
|
||||
* remove postinit / shutdown commands from rc array for both NAS4Free < 11.x and >= 11.x series
|
||||
* params:
|
||||
* $config_name: string to identify the rc command entry in rc|postinit/shutdown|cmd or rc|param|value
|
||||
*/
|
||||
if (!function_exists('ext_remove_rc_commands')) {
|
||||
function ext_remove_rc_commands($config_name) {
|
||||
global $config;
|
||||
// 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("/{$config_name}/", $config['rc']['postinit']['cmd'][$i])) unset($config['rc']['postinit']['cmd'][$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("/{$config_name}/", $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']['0'])) {
|
||||
$rc_param_count = count($config['rc']['param']);
|
||||
for ($i = 0; $i < $rc_param_count; $i++) {
|
||||
if (preg_match("/{$config_name}/", $config['rc']['param'][$i]['value'])) unset($config['rc']['param'][$i]);
|
||||
}
|
||||
}
|
||||
write_config();
|
||||
}
|
||||
}
|
||||
|
||||
/* function ext_check_version
|
||||
* checks an extension if a new version exists against the currently installed version
|
||||
* params:
|
||||
* $test_filename: filename including the full path which holds the version number
|
||||
* $extension_name: extension name in URL format to retrive from Github
|
||||
* $current_version: string of current installed version
|
||||
* $button_name: gettext("name") to create a note for user action, e.g. Maintenance, Update
|
||||
* return:
|
||||
* empty: no new version found
|
||||
* or string: message for user action on new version found
|
||||
* or false: Github version could not be retrieved
|
||||
*/
|
||||
if (!function_exists('ext_check_version')) {
|
||||
function ext_check_version($test_filename, $extension_name, $current_version, $button_name) {
|
||||
global $config;
|
||||
if (!is_file($test_filename) || filemtime($test_filename) < time() - 86400) { // test if file exists or is older than 24 hours
|
||||
$return_val = mwexec("fetch -o {$test_filename} https://raw.github.com/crestAT/nas4free-{$extension_name}/master/{$extension_name}/version.txt", false);
|
||||
if ($return_val == 0) {
|
||||
$server_version = exec("cat {$test_filename}");
|
||||
if ($server_version != $current_version) return sprintf(gettext("New extension version %s available, push '%s' button to install the new version!"), $server_version, $button_name)."<br />";
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* function ext_load_config
|
||||
* loads a json formatted array from a standalone file
|
||||
* params:
|
||||
* $config_file: config file including full path
|
||||
* return:
|
||||
* data array: json formatted array
|
||||
* or false: config file not found or content not retrievable
|
||||
*/
|
||||
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;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* function ext_save_config
|
||||
* loads a json formatted array from a standalone file
|
||||
* params:
|
||||
* $config_file: config file including full path
|
||||
* $config_data: php array with configuration data
|
||||
* return:
|
||||
* error condition
|
||||
*/
|
||||
if (!function_exists('ext_save_config')) {
|
||||
function ext_save_config($config_file, $config_data){
|
||||
header("Content-Type: application/json; UTF-8\n");
|
||||
file_put_contents($config_file, json_encode($config_data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ));
|
||||
return json_last_error();
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,145 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
onebuttoninstaller-update_extension.php
|
||||
|
||||
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("auth.inc");
|
||||
require("guiconfig.inc");
|
||||
|
||||
bindtextdomain("nas4free", "/usr/local/share/locale-obi");
|
||||
$pgtitle = array(gettext("Extensions"), gettext("OneButtonInstaller")." ".$config['onebuttoninstaller']['version'], gettext("Maintenance"));
|
||||
|
||||
if (is_file("{$config['onebuttoninstaller']['rootfolder']}log/oneload")) { require_once("{$config['onebuttoninstaller']['rootfolder']}log/oneload"); }
|
||||
|
||||
$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")); }
|
||||
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
|
||||
// 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']) && 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("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();
|
||||
header("Location:index.php");
|
||||
}
|
||||
|
||||
if (isset($_POST['ext_update']) && $_POST['ext_update']) {
|
||||
// download installer & install
|
||||
$return_val = mwexec("fetch -vo {$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-install.php 'https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/onebuttoninstaller-install.php'", true);
|
||||
if ($return_val == 0) {
|
||||
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-install.php");
|
||||
header("Refresh:8");;
|
||||
}
|
||||
else { $input_errors[] = sprintf(gettext("Download of installation file %s failed, installation aborted!"), "onebuttoninstaller-install.php"); }
|
||||
}
|
||||
|
||||
bindtextdomain("nas4free", "/usr/local/share/locale"); // to get the right main menu language
|
||||
include("fbegin.inc");
|
||||
bindtextdomain("nas4free", "/usr/local/share/locale-obi"); ?>
|
||||
<!-- 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-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">
|
||||
<?php if (isset($config['onebuttoninstaller']['enable'])) { ?>
|
||||
<li class="tabinact"><a href="onebuttoninstaller.php"><span><?=gettext("Install");?></span></a></li>
|
||||
<li class="tabinact"><a href="onebuttoninstaller-config.php"><span><?=gettext("Configuration");?></span></a></li>
|
||||
<li class="tabact"><a href="onebuttoninstaller-update_extension.php"><span><?=gettext("Maintenance");?></span></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="tabinact"><a href="onebuttoninstaller-config.php"><span><?=gettext("Configuration");?></span></a></li>
|
||||
<li class="tabact"><a href="onebuttoninstaller-update_extension.php"><span><?=gettext("Maintenance");?></span></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</td></tr>
|
||||
<tr><td class="tabcont">
|
||||
<?php if (!empty($input_errors)) print_input_errors($input_errors);?>
|
||||
<?php if (!empty($savemsg)) print_info_box($savemsg);?>
|
||||
<table width="100%" border="0" cellpadding="6" cellspacing="0">
|
||||
<?php html_titleline(gettext("Extension Update"));?>
|
||||
<?php html_text("ext_version_current", gettext("Installed version"), $config['onebuttoninstaller']['version']);?>
|
||||
<?php html_text("ext_version_server", gettext("Latest version"), $server_version);?>
|
||||
<?php html_separator();?>
|
||||
</table>
|
||||
<div id="update_remarks">
|
||||
<?php html_remark("note_remove", gettext("Note"), gettext("Removing OneButtonInstaller integration from NAS4Free will leave the installation folder untouched - remove the files using Windows Explorer, FTP or some other tool of your choice. <br /><b>Please note: this page will no longer be available.</b> You'll have to re-run OneButtonInstaller extension installation to get it back on your NAS4Free."));?>
|
||||
<br />
|
||||
<input id="ext_update" name="ext_update" type="submit" class="formbtn" value="<?=gettext("Update Extension");?>" onclick="return confirm('<?=gettext("The selected operation will be completed. Please do not click any other buttons!");?>')" />
|
||||
<input id="ext_remove" name="ext_remove" type="submit" class="formbtn" value="<?=gettext("Remove Extension");?>" onclick="return confirm('<?=gettext("Do you really want to remove the extension from the system?");?>')" />
|
||||
</div>
|
||||
<table width="100%" border="0" cellpadding="6" cellspacing="0">
|
||||
<?php html_separator();?>
|
||||
<?php html_separator();?>
|
||||
<?php html_titleline(gettext("Extension")." ".gettext("Release Notes"));?>
|
||||
<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 {$config['onebuttoninstaller']['rootfolder']}release_notes.txt", $lines); foreach ($lines as $line) { echo $line."\n"; }?></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php include("formend.inc");?>
|
||||
</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include("fend.inc");?>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
spinner.inc
|
||||
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Uses spin.js by Felix Gnass (fgnass) at http://spin.js.org
|
||||
@@ -1,12 +1,14 @@
|
||||
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.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###
|
||||
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 XigmaNAS with many improvements for Status > System and additional functions.<br><br>The extension improves the Status > System page to a "Dashboard" like page and provides a comprehensive set of monitoring and alarming features (CPU & Harddisk temperature, free disk space monitoring, ZFS health, User login, alarm history, audible alarming, notifications via email) as well as additional tools like USB Automount, Purge for CIFS/SMB shares and the integration of user defined log files and action buttons on Status > System.<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 XigmaNAS 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='https://www.xigmanas.com/forums/viewtopic.php?f=71&t=6405' target='_blank'>XigmaNAS 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 XigmaNAS 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 XigmaNAS 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 XigmaNAS 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 XigmaNAS forum.</font></b><br><br>The extension is compatible with all versions up to 10.3 of XigmaNAS and works on all plattforms (x86 & x64, embedded & full), does not need jail or pkg_add, add pages to XigmaNAS 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='https://www.xigmanas.com/forums/viewtopic.php?f=71&t=8299' target='_blank'>XigmaNAS 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 the Resilio Sync application on XigmaNAS servers.<br><br>The extension is compatible with all versions (9.1.x - 11.x) of XigmaNAS except on ARM boxes, works on all plattforms (embedded, full), does not need jail or pkg_add, add pages to XigmaNAS 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='https://www.xigmanas.com/forums/viewtopic.php?f=71&t=5704' target='_blank'>XigmaNAS 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 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">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 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.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 XigmaNAS 10.3 and later.<br><br>The extension works on XigmaNAS 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><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>
|
||||
NextOnwCloud###<font color="green">RELEASE<br>0.3.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 XigmaNAS servers.<br><br>The extension works on all plattforms, does not need jail or pkg_add and add pages to XigmaNAS WebGUI extensions.<br><font color="blue"><b>At the moment no SQL database system will be installed so the XigmaNAS built-in SQLite or an existing mySQL or MariaDB installation can be used.</b></font><br><br>Read more ... <a href='https://www.xigmanas.com/forums/viewtopic.php?f=71&t=11718' target='_blank'>XigmaNAS Forum</a>
|
||||
Plex Pass Media Server###<font color="red">BETA<br>4.2.x</font>###plex###mkdir -p plexpass && cd plexpass && fetch https://raw.githubusercontent.com/JRGTH/nas4free-plex-extension/master/plex/plexinit && chmod +x plexinit && ./plexinit -ao###plexpass/postinit###Plex Pass Media Server Add-On for XigmaNAS.<br><br><font color="blue">Plex Pass is the bleeding edge channel containing the latest innovative and cutting edge features for the premium (paid) users.<br>The Plex Pass package is an Early Access & Preview Release, this means that this version is targeted for Premium Paid Plex users who want to preview/test newer and upcoming features earlier, and all users should bear in mind that this preview/bleeding edge releases may or may not work as expected, things can work just partially or even not work at all, in this case/scenario the user should use the Plex Forums for support and/or report any bugs/malfunction encountered in such releases.</font><br><br>Read more about Plex Pass at the Plex Website ... <a href='https://support.plex.tv/hc/en-us/articles/200288566-What-is-Plex-Pass-' target='_blank'>What is Plex Pass?</a><br><br><b>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###
|
||||
Extended GUI###<font color="red">BETA<br>0.6.3-beta</font>###extended-gui-beta###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###Extension for XigmaNAS with many improvements for Status > System and additional functions.<br><br>The extension improves the Status > System page to a "Dashboard" like page and provides a comprehensive set of monitoring and alarming features (CPU & Harddisk temperature, free disk space monitoring, ZFS health, User login, alarm history, audible alarming, notifications via email or Telegram) as well as additional tools like USB Automount, Purge for CIFS/SMB shares and the integration of user defined log files and action buttons on Status > System.<br><br><font color="red"><b><h3>This is a development version, use it only for testing!</h3></b></font><b>Version 0.6.3b1 2017.06.20</b><br>N: add Telegram support for system notifications as well as for CLI & scripting use<br>N: add curl binary as prerquesite for Telegram (curl can be used also for CLI & scripting use)<br>N: STATUS | SYSTEM: services monitoring display row (each 'enabled' service will be monitored)<br>N: Extended GUI | CONFIGURATION: add hosts check type, can be 'parallel' ping, 'sequentiell' ping or 'ARP' (experimental)<br>N: Extended GUI | CONFIGURATION: services check warning notifications<br>N: Extended GUI | CONFIGURATION: Telegram configuration section for warning notifications<br>C: remove patched diag_log.php since search is now included in 11.x series of N4F<br>C: update patched diag_log.inc to 11.x series format<br>C: index.php: improvements for temperature display and services display, user defined action buttons appear in now in one row<br>C: logs.inc: user defined sample log file updated to 11.x format, includes UPS, ProFTP file transfer and Webserver examples<br>C: user, disks, hosts, services checks upgrades for Telgram notifications<br>C: disk_check.sh: improvements for SSD lifetime checks<br>C: hosts_check.sh: implemented Parallel Ping, Sequential Ping and ARP options<br>...<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='https://www.xigmanas.com/forums/viewtopic.php?f=71&t=6405' target='_blank'>XigmaNAS Forum</a>###10.3032853###
|
||||
@@ -1 +0,0 @@
|
||||
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.
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.
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 - 2017 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -24,23 +24,34 @@
|
||||
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("auth.inc");
|
||||
require("guiconfig.inc");
|
||||
|
||||
$configName = "onebuttoninstaller";
|
||||
$configFile = "ext/{$configName}/{$configName}.conf";
|
||||
require_once("ext/{$configName}/extension-lib.inc");
|
||||
|
||||
$domain = strtolower(get_product_name());
|
||||
$localeOSDirectory = "/usr/local/share/locale";
|
||||
$localeExtDirectory = "/usr/local/share/locale-{$configName}";
|
||||
bindtextdomain($domain, $localeExtDirectory);
|
||||
|
||||
// Dummy standard message gettext calls for xgettext retrieval!!!
|
||||
$dummy = gettext("The changes have been applied successfully.");
|
||||
$dummy = gettext("The configuration has been changed.<br />You must apply the changes in order for them to take effect.");
|
||||
$dummy = gettext("The following input errors were detected");
|
||||
|
||||
bindtextdomain("nas4free", "/usr/local/share/locale-obi");
|
||||
$pgtitle = array(gettext("Extensions"), gettext("OneButtonInstaller")." ".$config['onebuttoninstaller']['version'], gettext("Configuration"));
|
||||
if (($configuration = ext_load_config($configFile)) === false) $input_errors[] = sprintf(gettext("Configuration file %s not found!"), "{$configName}.conf");
|
||||
if (!isset($configuration['rootfolder']) && !is_dir($configuration['rootfolder'] )) $input_errors[] = gettext("Extension installed with fault");
|
||||
|
||||
if (!isset($config['onebuttoninstaller']) || !is_array($config['onebuttoninstaller'])) $config['onebuttoninstaller'] = array();
|
||||
$platform = $g['platform'];
|
||||
if ($platform == "livecd" || $platform == "liveusb")
|
||||
$input_errors[] = sprintf(gettext("Attention: the used XigmaNAS platform '%s' is not recommended for extensions! After a reboot all extensions will no longer be available, use XigmaNAS embedded or full platform instead!"), $platform);
|
||||
|
||||
$pgtitle = array(gettext("Extensions"), $configuration['appname']." ".$configuration['version'], gettext("Configuration"));
|
||||
|
||||
if (!isset($configuration) || !is_array($configuration)) $configuration = array();
|
||||
|
||||
/* Check if the directory exists, the mountpoint has at least o=rx permissions and
|
||||
* set the permission to 775 for the last directory in the path
|
||||
@@ -70,7 +81,7 @@ function change_perms($dir) {
|
||||
}
|
||||
else
|
||||
{
|
||||
$input_errors[] = sprintf(gettext("OneButtonInstaller needs at least read & execute permissions at the mount point for directory %s! Set the Read and Execute bits for Others (Access Restrictions | Mode) for the mount point %s (in <a href='disks_mount.php'>Disks | Mount Point | Management</a> or <a href='disks_zfs_dataset.php'>Disks | ZFS | Datasets</a>) and hit Save in order to take them effect."), $path, "/{$path_check[1]}/{$path_check[2]}");
|
||||
$input_errors[] = sprintf(gettext("{$configName} needs at least read & execute permissions at the mount point for directory %s! Set the Read and Execute bits for Others (Access Restrictions | Mode) for the mount point %s (in <a href='disks_mount.php'>Disks | Mount Point | Management</a> or <a href='disks_zfs_dataset.php'>Disks | ZFS | Datasets</a>) and hit Save in order to take them effect."), $path, "/{$path_check[1]}/{$path_check[2]}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,44 +90,41 @@ function change_perms($dir) {
|
||||
if (isset($_POST['save']) && $_POST['save']) {
|
||||
unset($input_errors);
|
||||
if (empty($input_errors)) {
|
||||
$config['onebuttoninstaller']['enable'] = isset($_POST['enable']) ? true : false;
|
||||
$configuration['enable'] = isset($_POST['enable']) ? true : false;
|
||||
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 (!isset($_POST['path_check']) && (strpos($config['onebuttoninstaller']['storage_path'], "/mnt/") === false)) {
|
||||
$configuration['storage_path'] = !empty($_POST['storage_path']) ? $_POST['storage_path'] : $g['media_path'];
|
||||
$configuration['storage_path'] = rtrim($configuration['storage_path'],'/'); // ensure to have NO trailing slash
|
||||
if (!isset($_POST['path_check']) && (strpos($configuration['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);
|
||||
if (!is_dir($configuration['storage_path'])) mkdir($configuration['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())." ";
|
||||
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-start.php");
|
||||
$configuration['path_check'] = isset($_POST['path_check']) ? true : false;
|
||||
$configuration['re_install'] = isset($_POST['re_install']) ? true : false;
|
||||
$configuration['auto_update'] = isset($_POST['auto_update']) ? true : false;
|
||||
$configuration['show_beta'] = isset($_POST['show_beta']) ? true : false;
|
||||
$savemsg .= get_std_save_message(ext_save_config($configFile, $configuration))." ";
|
||||
require_once("{$configuration['rootfolder']}/{$configName}-start.php");
|
||||
}
|
||||
}
|
||||
else $savemsg .= get_std_save_message(write_config())." ";
|
||||
else $savemsg .= get_std_save_message(ext_save_config($configFile, $configuration))." ";
|
||||
} // 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;
|
||||
$pconfig['enable'] = $configuration['enable'];
|
||||
$pconfig['storage_path'] = !empty($configuration['storage_path']) ? $configuration['storage_path'] : $g['media_path'];
|
||||
$pconfig['path_check'] = $configuration['path_check'];
|
||||
$pconfig['re_install'] = $configuration['re_install'];
|
||||
$pconfig['auto_update'] = $configuration['auto_update'];
|
||||
$pconfig['show_beta'] = $configuration['show_beta'];
|
||||
|
||||
$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 (($message = ext_check_version("{$configuration['rootfolder']}/version_server.txt", "{$configName}", $configuration['version'], gettext("Maintenance"))) !== false) $savemsg .= $message;
|
||||
|
||||
bindtextdomain("nas4free", "/usr/local/share/locale"); // to get the right main menu language
|
||||
bindtextdomain($domain, $localeOSDirectory);
|
||||
include("fbegin.inc");
|
||||
bindtextdomain("nas4free", "/usr/local/share/locale-obi"); ?>
|
||||
bindtextdomain($domain, $localeExtDirectory);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function enable_change(enable_change) {
|
||||
@@ -134,22 +142,19 @@ function enable_change(enable_change) {
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td class="tabnavtbl">
|
||||
<ul id="tabnav">
|
||||
<?php if (isset($config['onebuttoninstaller']['enable'])) { ?>
|
||||
<?php if ($configuration['enable']) { ?>
|
||||
<li class="tabinact"><a href="onebuttoninstaller.php"><span><?=gettext("Install");?></span></a></li>
|
||||
<li class="tabact"><a href="onebuttoninstaller-config.php"><span><?=gettext("Configuration");?></span></a></li>
|
||||
<li class="tabinact"><a href="onebuttoninstaller-update_extension.php"><span><?=gettext("Maintenance");?></span></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="tabact"><a href="onebuttoninstaller-config.php"><span><?=gettext("Configuration");?></span></a></li>
|
||||
<li class="tabinact"><a href="onebuttoninstaller-update_extension.php"><span><?=gettext("Maintenance");?></span></a></li>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<li class="tabact"><a href="onebuttoninstaller-config.php"><span><?=gettext("Configuration");?></span></a></li>
|
||||
<li class="tabinact"><a href="onebuttoninstaller-update_extension.php"><span><?=gettext("Maintenance");?></span></a></li>
|
||||
</ul>
|
||||
</td></tr>
|
||||
<tr><td class="tabcont">
|
||||
<?php if (!empty($input_errors)) print_input_errors($input_errors);?>
|
||||
<?php if (!empty($savemsg)) print_info_box($savemsg);?>
|
||||
<table width="100%" border="0" cellpadding="6" cellspacing="0">
|
||||
<?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_titleline_checkbox("enable", gettext($configuration['appname']), $pconfig['enable'], gettext("Enable"), "enable_change(false)");?>
|
||||
<?php html_text("installation_directory", gettext("Installation directory"), sprintf(gettext("The extension is installed in %s"), $configuration['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);?>
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-install.php
|
||||
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -24,19 +24,16 @@
|
||||
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.
|
||||
*/
|
||||
$v = "v0.3.4.1"; // extension version
|
||||
$appname = "OneButtonInstaller";
|
||||
$v = "v0.4"; // extension version
|
||||
$appName = "OneButtonInstaller";
|
||||
$configName = "onebuttoninstaller";
|
||||
|
||||
require_once("config.inc");
|
||||
|
||||
$arch = $g['arch'];
|
||||
$platform = $g['platform'];
|
||||
// no check necessary since the extension is for all archictectures/platforms/releases
|
||||
// no check necessary since the extension is for all archictectures/platforms/releases => N: warnings for livecd && liveusb within the pages
|
||||
//if (($arch != "i386" && $arch != "amd64") && ($arch != "x86" && $arch != "x64" && $arch != "rpi" && $arch != "rpi2")) { echo "\f{$arch} is an unsupported architecture!\n"; exit(1); }
|
||||
//if ($platform != "embedded" && $platform != "full" && $platform != "livecd" && $platform != "liveusb") { echo "\funsupported platform!\n"; exit(1); }
|
||||
|
||||
@@ -44,8 +41,7 @@ $platform = $g['platform'];
|
||||
global $input_errors;
|
||||
global $savemsg;
|
||||
|
||||
$install_dir = dirname(__FILE__)."/"; // get directory where the installer script resides
|
||||
if (!is_dir("{$install_dir}log")) { mkdir("{$install_dir}log", 0775, true); }
|
||||
$install_dir = dirname(__FILE__); // get directory where the installer script resides
|
||||
|
||||
// check FreeBSD release for fetch options >= 9.3
|
||||
$release = explode("-", exec("uname -r"));
|
||||
@@ -54,14 +50,16 @@ else $verify_hostname = "";
|
||||
// create stripped version name
|
||||
$vs = str_replace(".", "", $v);
|
||||
// fetch release archive
|
||||
$return_val = mwexec("fetch {$verify_hostname} -vo {$install_dir}master.zip 'https://github.com/crestAT/nas4free-onebuttoninstaller/releases/download/{$v}/onebuttoninstaller-{$vs}.zip'", true);
|
||||
$return_val = mwexec("fetch {$verify_hostname} -vo {$install_dir}/master.zip 'https://github.com/crestAT/nas4free-{$configName}/releases/download/{$v}/{$configName}-{$vs}.zip'", false);
|
||||
if ($return_val == 0) {
|
||||
$return_val = mwexec("tar -xf {$install_dir}master.zip -C {$install_dir} --exclude='.git*' --strip-components 2", true);
|
||||
$return_val = mwexec("tar -xf {$install_dir}/master.zip -C {$install_dir} --exclude='.git*' --strip-components 2", true);
|
||||
if ($return_val == 0) {
|
||||
exec("rm {$install_dir}master.zip");
|
||||
exec("rm {$install_dir}/master.zip");
|
||||
exec("chmod -R 775 {$install_dir}");
|
||||
if (is_file("{$install_dir}version.txt")) { $file_version = exec("cat {$install_dir}version.txt"); }
|
||||
else { $file_version = "n/a"; }
|
||||
require_once("{$install_dir}/ext/extension-lib.inc");
|
||||
$configFile = "{$install_dir}/ext/{$configName}.conf";
|
||||
if (is_file("{$install_dir}/version.txt")) $file_version = exec("cat {$install_dir}/version.txt");
|
||||
else $file_version = "n/a";
|
||||
$savemsg = sprintf(gettext("Update to version %s completed!"), $file_version);
|
||||
}
|
||||
else {
|
||||
@@ -74,69 +72,41 @@ else {
|
||||
return;
|
||||
}
|
||||
|
||||
// uninstall old OBI files < v0.4 and remove the application section from config.xml
|
||||
if (is_array($config['onebuttoninstaller'])) {
|
||||
mwexec("rm -Rf /usr/local/www/onebuttoninstaller*", false);
|
||||
mwexec("rm -Rf /usr/local/www/ext/onebuttoninstaller", false);
|
||||
mwexec("rm -Rf {$install_dir}/locale-obi", false);
|
||||
mwexec("rm -Rf {$install_dir}/log", false);
|
||||
if (is_link("/usr/local/share/locale-obi")) unlink("/usr/local/share/locale-obi");
|
||||
$configuration = $config['onebuttoninstaller'];
|
||||
unset($config['onebuttoninstaller']);
|
||||
write_config();
|
||||
}
|
||||
|
||||
// install / update application on NAS4Free
|
||||
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]);
|
||||
if (!is_array($configuration)) { // from an old OBI < 0.4 installation
|
||||
if (($configuration = ext_load_config($configFile)) === false) { // from an OBI >= 0.4 installation
|
||||
$configuration = array(); // new installation
|
||||
$new_installation = true;
|
||||
}
|
||||
}
|
||||
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]);
|
||||
}
|
||||
}
|
||||
$configuration['appname'] = $appName;
|
||||
$configuration['version'] = exec("cat {$install_dir}/version.txt");
|
||||
$configuration['rootfolder'] = $install_dir;
|
||||
$configuration['postinit'] = "/usr/local/bin/php-cgi -f {$install_dir}/{$configName}-start.php";
|
||||
$configuration['shutdown'] = "/usr/local/bin/php-cgi -f {$install_dir}/{$configName}-stop.php";
|
||||
|
||||
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'];
|
||||
// remove start/stop commands and existing old rc format entries
|
||||
ext_remove_rc_commands($configName);
|
||||
$configuration['rc_uuid_start'] = $configuration['postinit'];
|
||||
$configuration['rc_uuid_stop'] = $configuration['shutdown'];
|
||||
ext_create_rc_commands($appName, $configuration['rc_uuid_start'], $configuration['rc_uuid_stop']);
|
||||
ext_save_config($configFile, $configuration);
|
||||
|
||||
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 {
|
||||
$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";
|
||||
}
|
||||
require_once("{$install_dir}/{$configName}-start.php");
|
||||
if ($new_installation) echo "\nInstallation completed, use WebGUI | Extensions | {$appName} to configure the application!\n";
|
||||
|
||||
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);
|
||||
$return_val = mwexec("fetch -o {$install_dir}/extensions.txt https://raw.github.com/crestAT/nas4free-{$configName}/master/{$configName}/extensions.txt", false);
|
||||
?>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-start.php
|
||||
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -24,17 +24,30 @@
|
||||
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");
|
||||
|
||||
$extension_dir = "/usr/local/www";
|
||||
$configName = "onebuttoninstaller";
|
||||
$rootfolder = dirname(__FILE__);
|
||||
|
||||
mwexec("ln -sf {$config['onebuttoninstaller']['rootfolder']}locale-obi /usr/local/share/", true); // create link to languages
|
||||
$return_val = mwexec("cp -R {$config['onebuttoninstaller']['rootfolder']}ext/* {$extension_dir}/", true);
|
||||
if ($return_val == 0) exec("logger onebuttoninstaller: started");
|
||||
else exec("logger onebuttoninstaller: error during startup, file copy to {$extension_dir} failed");
|
||||
if (is_link("/usr/local/share/locale-{$configName}")) unlink("/usr/local/share/locale-{$configName}");
|
||||
if (is_link("/usr/local/www/{$configName}.php")) unlink("/usr/local/www/{$configName}.php");
|
||||
if (is_link("/usr/local/www/{$configName}-config.php")) unlink("/usr/local/www/{$configName}-config.php");
|
||||
if (is_link("/usr/local/www/{$configName}-update_extension.php")) unlink("/usr/local/www/{$configName}-update_extension.php");
|
||||
if (is_link("/usr/local/www/ext/{$configName}")) unlink("/usr/local/www/ext/{$configName}");
|
||||
mwexec("rmdir -p /usr/local/www/ext");
|
||||
$return_val = 0;
|
||||
// create links to extension files
|
||||
$return_val += mwexec("ln -sw {$rootfolder}/locale-{$configName} /usr/local/share/", true);
|
||||
$return_val += mwexec("ln -sw {$rootfolder}/{$configName}.php /usr/local/www/{$configName}.php", true);
|
||||
$return_val += mwexec("ln -sw {$rootfolder}/{$configName}-config.php /usr/local/www/{$configName}-config.php", true);
|
||||
$return_val += mwexec("ln -sw {$rootfolder}/{$configName}-update_extension.php /usr/local/www/{$configName}-update_extension.php", true);
|
||||
$return_val += mwexec("mkdir -p /usr/local/www/ext", true);
|
||||
$return_val += mwexec("ln -sw {$rootfolder}/ext /usr/local/www/ext/{$configName}", true);
|
||||
// check for product name and eventually rename translation files for new product name (XigmaNAS)
|
||||
$domain = strtolower(get_product_name());
|
||||
if ($domain <> "nas4free") $return_val += mwexec("find {$rootfolder}/locale-{$configName} -name nas4free.mo -execdir mv nas4free.mo {$domain}.mo \;", true);
|
||||
|
||||
if ($return_val == 0) exec("logger {$configName}-extension: started");
|
||||
else exec("logger {$configName}-extension: error(s) during startup, failed with return value = {$return_val}");
|
||||
?>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller-stop.php
|
||||
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -24,17 +24,17 @@
|
||||
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");
|
||||
|
||||
$extension_dir = "/usr/local/www";
|
||||
$configName = "onebuttoninstaller";
|
||||
|
||||
mwexec("rm -Rf {$extension_dir}/onebuttoninstaller*", true);
|
||||
mwexec("rm -Rf {$extension_dir}/ext/onebuttoninstaller", true);
|
||||
if (is_link("/usr/local/share/locale-obi")) unlink("/usr/local/share/locale-obi");
|
||||
exec("logger onebuttoninstaller: stopped");
|
||||
if (is_link("/usr/local/share/locale-{$configName}")) unlink("/usr/local/share/locale-{$configName}");
|
||||
if (is_link("/usr/local/www/{$configName}.php")) unlink("/usr/local/www/{$configName}.php");
|
||||
if (is_link("/usr/local/www/{$configName}-config.php")) unlink("/usr/local/www/{$configName}-config.php");
|
||||
if (is_link("/usr/local/www/{$configName}-update_extension.php")) unlink("/usr/local/www/{$configName}-update_extension.php");
|
||||
if (is_link("/usr/local/www/ext/{$configName}")) unlink("/usr/local/www/ext/{$configName}");
|
||||
mwexec("rmdir -p /usr/local/www/ext");
|
||||
|
||||
exec("logger onebuttoninstaller-extension: stopped");
|
||||
?>
|
||||
|
||||
124
onebuttoninstaller/onebuttoninstaller-update_extension.php
Normal file
124
onebuttoninstaller/onebuttoninstaller-update_extension.php
Normal file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/*
|
||||
onebuttoninstaller-update_extension.php
|
||||
|
||||
Copyright (c) 2015 - 2018 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("auth.inc");
|
||||
require("guiconfig.inc");
|
||||
|
||||
$configName = "onebuttoninstaller";
|
||||
$configFile = "ext/{$configName}/{$configName}.conf";
|
||||
require_once("ext/{$configName}/extension-lib.inc");
|
||||
|
||||
$domain = strtolower(get_product_name());
|
||||
$localeOSDirectory = "/usr/local/share/locale";
|
||||
$localeExtDirectory = "/usr/local/share/locale-{$configName}";
|
||||
bindtextdomain($domain, $localeExtDirectory);
|
||||
|
||||
if (($configuration = ext_load_config($configFile)) === false) $input_errors[] = sprintf(gettext("Configuration file %s not found!"), "{$configName}.conf");
|
||||
if (!isset($configuration['rootfolder']) && !is_dir($configuration['rootfolder'] )) $input_errors[] = gettext("Extension installed with fault");
|
||||
|
||||
$pgtitle = array(gettext("Extensions"), gettext($configuration['appname'])." ".$configuration['version'], gettext("Maintenance"));
|
||||
|
||||
if (is_file("{$configuration['rootfolder']}/oneload")) { require_once("{$configuration['rootfolder']}/oneload"); }
|
||||
|
||||
$return_val = mwexec("fetch -o {$configuration['rootfolder']}/version_server.txt https://raw.github.com/crestAT/nas4free-{$configName}/master/{$configName}/version.txt", false);
|
||||
if ($return_val == 0) {
|
||||
$server_version = exec("cat {$configuration['rootfolder']}/version_server.txt");
|
||||
if ($server_version != $configuration['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 {$configuration['rootfolder']}/release_notes.txt https://raw.github.com/crestAT/nas4free-{$configName}/master/{$configName}/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
|
||||
ext_remove_rc_commands($configName);
|
||||
// remove extension pages/links
|
||||
require_once("{$configuration['rootfolder']}/{$configName}-stop.php");
|
||||
header("Location:index.php");
|
||||
}
|
||||
|
||||
if (isset($_POST['ext_update']) && $_POST['ext_update']) {
|
||||
// download installer & install
|
||||
$return_val = mwexec("fetch -vo {$configuration['rootfolder']}/{$configName}-install.php 'https://raw.github.com/crestAT/nas4free-{$configName}/master/{$configName}/{$configName}-install.php'", false);
|
||||
if ($return_val == 0) {
|
||||
require_once("{$configuration['rootfolder']}/{$configName}-install.php");
|
||||
header("Refresh:8");;
|
||||
}
|
||||
else { $input_errors[] = sprintf(gettext("Download of installation file %s failed, installation aborted!"), "{$configName}-install.php"); }
|
||||
}
|
||||
|
||||
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()">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td class="tabnavtbl">
|
||||
<ul id="tabnav">
|
||||
<?php if ($configuration['enable']) { ?>
|
||||
<li class="tabinact"><a href="onebuttoninstaller.php"><span><?=gettext("Install");?></span></a></li>
|
||||
<?php } ?>
|
||||
<li class="tabinact"><a href="onebuttoninstaller-config.php"><span><?=gettext("Configuration");?></span></a></li>
|
||||
<li class="tabact"><a href="onebuttoninstaller-update_extension.php"><span><?=gettext("Maintenance");?></span></a></li>
|
||||
</ul>
|
||||
</td></tr>
|
||||
<tr><td class="tabcont">
|
||||
<?php if (!empty($input_errors)) print_input_errors($input_errors);?>
|
||||
<?php if (!empty($savemsg)) print_info_box($savemsg);?>
|
||||
<table width="100%" border="0" cellpadding="6" cellspacing="0">
|
||||
<?php html_titleline(gettext("Extension Update"));?>
|
||||
<?php html_text("ext_version_current", gettext("Installed version"), $configuration['version']);?>
|
||||
<?php html_text("ext_version_server", gettext("Latest version"), $server_version);?>
|
||||
<?php html_separator();?>
|
||||
</table>
|
||||
<div id="update_remarks">
|
||||
<?php html_remark("note_remove", gettext("Note"), gettext("Removing {$configuration['appname']} integration from NAS4Free will leave the installation folder untouched - remove the files using Windows Explorer, FTP or some other tool of your choice. <br /><b>Please note: this page will no longer be available.</b> You'll have to re-run {$configuration['appname']} extension installation to get it back on your NAS4Free."));?>
|
||||
<br />
|
||||
<input id="ext_update" name="ext_update" type="submit" class="formbtn" value="<?=gettext("Update Extension");?>" onclick="return confirm('<?=gettext("The selected operation will be completed. Please do not click any other buttons!");?>')" />
|
||||
<input id="ext_remove" name="ext_remove" type="submit" class="formbtn" value="<?=gettext("Remove Extension");?>" onclick="return confirm('<?=gettext("Do you really want to remove the extension from the system?");?>')" />
|
||||
</div>
|
||||
<table width="100%" border="0" cellpadding="6" cellspacing="0">
|
||||
<?php html_separator();?>
|
||||
<?php html_separator();?>
|
||||
<?php html_titleline(gettext("Extension")." ".gettext("Release Notes"));?>
|
||||
<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>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php include("formend.inc");?>
|
||||
</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include("fend.inc");?>
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
onebuttoninstaller.php
|
||||
|
||||
Copyright (c) 2015 - 2017 Andreas Schmidhuber
|
||||
Copyright (c) 2015 - 2018 Andreas Schmidhuber
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -24,27 +24,44 @@
|
||||
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("auth.inc");
|
||||
require("guiconfig.inc");
|
||||
|
||||
if (is_file("/usr/local/www/bar_left.gif")) $image_path = '';
|
||||
else $image_path = 'images/';
|
||||
|
||||
require("auth.inc");
|
||||
require("guiconfig.inc");
|
||||
if (!isset($config['onebuttoninstaller']['enable'])) header("Location:onebuttoninstaller-config.php");
|
||||
$configName = "onebuttoninstaller";
|
||||
$configFile = "ext/{$configName}/{$configName}.conf";
|
||||
require_once("ext/{$configName}/extension-lib.inc");
|
||||
|
||||
bindtextdomain("nas4free", "/usr/local/share/locale-obi");
|
||||
$pgtitle = array(gettext("Extensions"), gettext("OneButtonInstaller")." ".$config['onebuttoninstaller']['version']);
|
||||
$domain = strtolower(get_product_name());
|
||||
$localeOSDirectory = "/usr/local/share/locale";
|
||||
$localeExtDirectory = "/usr/local/share/locale-{$configName}";
|
||||
bindtextdomain($domain, $localeExtDirectory);
|
||||
|
||||
if (($configuration = ext_load_config($configFile)) === false) $input_errors[] = sprintf(gettext("Configuration file %s not found!"), "{$configName}.conf");
|
||||
if (!isset($configuration['rootfolder']) && !is_dir($configuration['rootfolder'] )) $input_errors[] = gettext("Extension installed with fault");
|
||||
|
||||
if (!$configuration['enable']) header("Location:onebuttoninstaller-config.php");
|
||||
|
||||
$platform = $g['platform'];
|
||||
if ($platform == "livecd" || $platform == "liveusb")
|
||||
$input_errors[] = sprintf(gettext("Attention: the used XigmaNAS platform '%s' is not recommended for extensions! After a reboot all extensions will no longer be available, use XigmaNAS embedded or full platform instead!"), $platform);
|
||||
|
||||
$pgtitle = array(gettext("Extensions"), $configuration['appname']." ".$configuration['version']);
|
||||
|
||||
$pingServer = "github.com";
|
||||
$pingReturnVal = mwexec("ping -c1 {$pingServer}", true);
|
||||
if ($pingReturnVal != 0) $input_errors[] = sprintf(gettext("Internet connection or the server '%s' is not available, please check your DNS settings under %s > %s | %s.
|
||||
Currently the first IPv4 DNS server address is set to '%s'"), $pingServer, gettext("System"), gettext("General Setup"), gettext("DNS"), $config['system']['dnsserver'][0]);
|
||||
|
||||
$log = 0;
|
||||
$loginfo = array(
|
||||
array(
|
||||
"visible" => TRUE,
|
||||
"desc" => gettext("Extensions"),
|
||||
"logfile" => "{$config['onebuttoninstaller']['rootfolder']}extensions.txt",
|
||||
"logfile" => "{$configuration['rootfolder']}/extensions.txt",
|
||||
"filename" => "extensions.txt",
|
||||
"type" => "plain",
|
||||
"pattern" => "/^(.*)###(.*)###(.*)###(.*)###(.*)###(.*)###(.*)$/",
|
||||
@@ -109,10 +126,7 @@ function log_get_status($cmd_entry) {
|
||||
}
|
||||
|
||||
function log_display($loginfo) {
|
||||
global $g;
|
||||
global $config;
|
||||
global $savemsg;
|
||||
global $image_path;
|
||||
global $g, $config, $configuration, $savemsg, $image_path;
|
||||
|
||||
if (!is_array($loginfo)) return;
|
||||
|
||||
@@ -149,7 +163,7 @@ function log_display($loginfo) {
|
||||
if ((FALSE === $result) || (0 == $result)) continue;
|
||||
echo "<tr valign=\"top\">\n";
|
||||
for ($i = 0; $i < count($loginfo['columns']); $i++) { // handle pmids (columns)
|
||||
if (!isset($config['onebuttoninstaller']['show_beta']) && (strpos($result[1], "RELEASE") === false)) continue; //check for beta state
|
||||
if (!$configuration['show_beta'] && (strpos($result[1], "RELEASE") === false)) continue; //check for beta state
|
||||
else {
|
||||
if ($i == count($loginfo['columns']) - 1) {
|
||||
if (!empty($result[6])) { // something unsupported exist
|
||||
@@ -168,7 +182,7 @@ function log_display($loginfo) {
|
||||
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']) ) {
|
||||
if (!$already_installed || $configuration['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]."' />
|
||||
@@ -185,26 +199,43 @@ function log_display($loginfo) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['cleanup'], $_POST['name'])) {
|
||||
foreach($_POST['name'] as $line) {
|
||||
if (isset($line['extension'])) {
|
||||
ext_remove_rc_commands($line['extension']); // remove entry from command scripts
|
||||
unset($config[$line['extension']]); // remove entry from config.xml
|
||||
if ($line['extension'] == "plexinit") $line['extension'] = "plex-gui"; // special treatment for plex gui
|
||||
if (file_exists("/usr/local/www/ext/{$line['extension']}/menu.inc"))
|
||||
unlink("/usr/local/www/ext/{$line['extension']}/menu.inc"); // remove entry from extensions menu
|
||||
write_config();
|
||||
$savemsg .= gettext("Cleanup").": <b>{$line['truename']} ({$line['extension']})</b>"."<br />";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['install'], $_POST['name'])) {
|
||||
foreach($_POST['name'] as $line) {
|
||||
if (isset($line['extension'])) {
|
||||
ext_remove_rc_commands($line['extension']); // to force correct command script entries in case of recovered/changed config/directories for extensions
|
||||
unset($config[$line['extension']]);
|
||||
write_config();
|
||||
$savemsg .= gettext("Installation").": <b>{$line['truename']}</b>"."<br />";
|
||||
unset($result);
|
||||
exec("cd {$config["onebuttoninstaller"]["storage_path"]} && {$line['command1']}", $result, $return_val);
|
||||
exec("cd {$configuration['storage_path']} && {$line['command1']}", $result, $return_val);
|
||||
if ($return_val == 0) {
|
||||
foreach ($result as $msg) $savemsg .= $msg."<br />"; // output on success
|
||||
unset($result);
|
||||
if ("{$line['command2']}" != "-") { // check if a PHP script must be executed
|
||||
if (file_exists("{$config["onebuttoninstaller"]["storage_path"]}/{$line['command2']}")) {
|
||||
if (file_exists("{$configuration['storage_path']}/{$line['command2']}")) {
|
||||
$savemsg_old = $savemsg; // save messages for use after output buffering ends
|
||||
ob_start(); // start output buffering
|
||||
include("{$config['onebuttoninstaller']['storage_path']}/{$line['command2']}");
|
||||
include("{$configuration['storage_path']}/{$line['command2']}");
|
||||
$ausgabe = ob_get_contents(); // get outputs from include command
|
||||
ob_end_clean(); // close output buffering
|
||||
$savemsg = $savemsg_old; // recover saved messages ...
|
||||
$savemsg .= str_replace("\n", "<br />", $ausgabe)."<br />"; // ... and append messages from include command
|
||||
}
|
||||
else $errormsg .= sprintf(gettext("PHP script %s not found!"), "{$config["onebuttoninstaller"]["storage_path"]}/{$line['command2']}")."<br />";
|
||||
else $errormsg .= sprintf(gettext("PHP script %s not found!"), "{$configuration['storage_path']}/{$line['command2']}")."<br />";
|
||||
}
|
||||
} // EOcommand1 OK
|
||||
else { // throw error message for command1
|
||||
@@ -215,24 +246,21 @@ if (isset($_POST['install'], $_POST['name'])) {
|
||||
} // EOforeach
|
||||
} // EOinstall
|
||||
|
||||
if (isset($_POST['update']) || (isset($config['onebuttoninstaller']['auto_update']) && !isset($_POST['install']))) {
|
||||
$return_val = mwexec("fetch -o {$config['onebuttoninstaller']['rootfolder']}extensions.txt https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/extensions.txt", true);
|
||||
// extensions list file handling for => manual update | auto update | missing file | file older than 24 hours
|
||||
if (isset($_POST['update']) || ($configuration['auto_update'] && !isset($_POST['install'])) || !is_file("{$configuration['rootfolder']}/extensions.txt") || filemtime("{$configuration['rootfolder']}/extensions.txt") < time() - 86400) {
|
||||
$return_val = mwexec("fetch -o {$configuration['rootfolder']}/extensions.txt https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/extensions.txt", false);
|
||||
if ($return_val == 0) $savemsg .= gettext("New extensions list successfully downloaded!")."<br />";
|
||||
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 (($message = ext_check_version("{$configuration['rootfolder']}/version_server.txt", "onebuttoninstaller", $configuration['version'], gettext("Maintenance"))) !== false) $savemsg .= $message;
|
||||
|
||||
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"));
|
||||
if (!is_file("{$configuration['rootfolder']}/extensions.txt")) $errormsg .= sprintf(gettext("File %s not found!"), "{$configuration['rootfolder']}/extensions.txt")."<br />";
|
||||
|
||||
bindtextdomain("nas4free", "/usr/local/share/locale"); // to get the right main menu language
|
||||
bindtextdomain($domain, $localeOSDirectory);
|
||||
include("fbegin.inc");
|
||||
bindtextdomain("nas4free", "/usr/local/share/locale-obi"); ?>
|
||||
bindtextdomain($domain, $localeExtDirectory);
|
||||
?>
|
||||
<!-- The Spinner Elements -->
|
||||
<?php include("ext/onebuttoninstaller/spinner.inc");?>
|
||||
<script src="ext/onebuttoninstaller/spin.min.js"></script>
|
||||
@@ -248,8 +276,14 @@ bindtextdomain("nas4free", "/usr/local/share/locale-obi"); ?>
|
||||
</ul>
|
||||
</td></tr>
|
||||
<tr><td class="tabcont">
|
||||
<?php if (!empty($input_errors)) print_input_errors($input_errors);?>
|
||||
<?php if (!empty($savemsg)) print_info_box($savemsg);?>
|
||||
<?php if (!empty($errormsg)) print_error_box($errormsg);?>
|
||||
<?php
|
||||
if ($configuration['re_install']) $remarkmsg .= "<li>".sprintf(gettext("Option '%s' in '%s' is enabled!"), gettext("Re-install"), gettext("Configuration"))."</li>";
|
||||
if ($configuration['show_beta']) $remarkmsg .= "<li>".sprintf(gettext("Option '%s' in '%s' is enabled!"), gettext("Beta releases"), gettext("Configuration"))."</li>";
|
||||
html_remark("storage_path", gettext("Common directory")." - {$configuration['storage_path']}", $remarkmsg);
|
||||
?><br />
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<?php
|
||||
log_display($loginfo[$log]);
|
||||
@@ -263,6 +297,9 @@ bindtextdomain("nas4free", "/usr/local/share/locale-obi"); ?>
|
||||
</div>
|
||||
<div id="submit">
|
||||
<input name="install" type="submit" class="formbtn" title="<?=gettext("Install extensions");?>" value="<?=gettext("Install");?>" onclick="return confirm('<?=gettext("Ready to install the selected extensions?");?>')" />
|
||||
<?php if ($configuration['re_install']) { ?>
|
||||
<input name="cleanup" type="submit" class="formbtn" title="<?=gettext("Cleanup of config and command scripts for selected entries - THIS DOES NOT PERFORM ANY UNINSTALL PROCEDURE NOR REMOVE FILES/DIRECTORIES FROM THE SERVER! Regular uninstallation should be done inside of the extensions!");?>" value="<?=gettext("Cleanup");?>" onclick="return confirm('<?=gettext("Ready to cleanup selected entries?");?>')" />
|
||||
<?php } ?>
|
||||
<input name="update" type="submit" class="formbtn" title="<?=gettext("Update extensions list");?>" value="<?=gettext("Update");?>" />
|
||||
</div>
|
||||
<?php include("formend.inc");?>
|
||||
@@ -1,4 +1,13 @@
|
||||
Version Date Description
|
||||
0.4 2018.08.15 N: Ncurses Disk Usage (ncdu) shell app
|
||||
N: use dedicated config file
|
||||
N: check and warn if on LiveUSB/LiveCD
|
||||
N: check for working internet connection
|
||||
N: cleanup button on install page - usable in conjunction with the option 'Re-install' to only perform a cleanup
|
||||
without new installation of extensions
|
||||
C: improvements for option 'Re-install', cleanup of config and command scripts prior to the installation process
|
||||
F: GUI translations not working due to name change to XigmaNAS
|
||||
|
||||
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
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.3.4.1
|
||||
0.4
|
||||
Reference in New Issue
Block a user