beta 2
N: check for supported architecture, plattform N: auto update of extensions list
This commit is contained in:
@@ -103,6 +103,7 @@ if (isset($_POST['save']) && $_POST['save']) {
|
||||
$config['onebuttoninstaller']['storage_path'] = rtrim($config['onebuttoninstaller']['storage_path'],'/'); // ensure to have NO trailing slash
|
||||
if (!is_dir($config['onebuttoninstaller']['storage_path'])) mkdir($config['onebuttoninstaller']['storage_path'], 0775, true);
|
||||
change_perms($_POST['storage_path']);
|
||||
$config['onebuttoninstaller']['auto_update'] = isset($_POST['auto_update']) ? true : false;
|
||||
|
||||
if (isset($_POST['enable_schedule']) && ($_POST['startup'] == $_POST['closedown'])) { $input_errors[] = gettext("Startup and closedown hour must be different!"); }
|
||||
else {
|
||||
@@ -244,6 +245,7 @@ if (isset($_POST['save']) && $_POST['save']) {
|
||||
|
||||
$pconfig['enable'] = isset($config['onebuttoninstaller']['enable']) ? true : false;
|
||||
$pconfig['storage_path'] = !empty($config['onebuttoninstaller']['storage_path']) ? $config['onebuttoninstaller']['storage_path'] : $g['media_path'];
|
||||
$pconfig['auto_update'] = isset($config['onebuttoninstaller']['auto_update']) ? true : false;
|
||||
|
||||
include("fbegin.inc");?>
|
||||
<script type="text/javascript">
|
||||
@@ -252,6 +254,7 @@ function enable_change(enable_change) {
|
||||
var endis = !(document.iform.enable.checked || enable_change);
|
||||
document.iform.storage_path.disabled = endis;
|
||||
document.iform.storage_pathbrowsebtn.disabled = endis;
|
||||
document.iform.auto_update.disabled = endis;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
@@ -276,6 +279,7 @@ function enable_change(enable_change) {
|
||||
<?php html_titleline_checkbox("enable", gettext("OneButtonInstaller"), $pconfig['enable'], gettext("Enable"), "enable_change(false)");?>
|
||||
<?php html_text("installation_directory", gettext("Installation directory"), sprintf(gettext("The extension is installed in %s."), $config['onebuttoninstaller']['rootfolder']));?>
|
||||
<?php html_filechooser("storage_path", gettext("Common directory"), $pconfig['storage_path'], gettext("Common root 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("auto_update", gettext("Update"), $pconfig['auto_update'], gettext("Update extensions list automatically."), "", false);?>
|
||||
</table>
|
||||
<div id="submit">
|
||||
<input id="save" name="save" type="submit" class="formbtn" value="<?=gettext("Save & Restart");?>"/>
|
||||
|
||||
@@ -43,7 +43,7 @@ $loginfo = array(
|
||||
"logfile" => "{$config['onebuttoninstaller']['rootfolder']}extensions.txt",
|
||||
"filename" => "extensions.txt",
|
||||
"type" => "plain",
|
||||
"pattern" => "/^(.*)###(.*)###(.*)###(.*)###(.*)###(.*)$/",
|
||||
"pattern" => "/^(.*)###(.*)###(.*)###(.*)###(.*)###(.*)###(.*)$/",
|
||||
"columns" => array(
|
||||
array("title" => gettext("Extensions"), "class" => "listlr", "param" => "align=\"left\" valign=\"middle\" nowrap", "pmid" => 0),
|
||||
array("title" => gettext("Version"), "class" => "listr", "param" => "align=\"center\" valign=\"middle\"", "pmid" => 1),
|
||||
@@ -89,6 +89,7 @@ function log_display($loginfo) {
|
||||
* command(list)1: 3 execution of SHELL commands / scripts (e.g. download installer, untar, chmod, ...)
|
||||
* command(list)2: 4 empty ("-") or PHP script name (file MUST exist)
|
||||
* description: 5 plain text which can include HTML tags
|
||||
* unsupported 6 unsupported architecture, plattform
|
||||
*/
|
||||
|
||||
// Create table data
|
||||
@@ -99,21 +100,29 @@ function log_display($loginfo) {
|
||||
echo "<tr valign=\"top\">\n";
|
||||
for ($i = 0; $i < count($loginfo['columns']); $i++) { // handle pmids (columns)
|
||||
if ($i == count($loginfo['columns']) - 1) {
|
||||
// check if extension is already installed (existing config.xml entry or, for command line tools, based on installation directory)
|
||||
if ((isset($config[$result[2]])) || ((strpos($result[2], "/") == 0) && (is_dir("{$config['onebuttoninstaller']['storage_path']}{$result[2]}")))){
|
||||
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'> <img src='status_enabled.png' border='0' alt='' title='".gettext('Enabled')."' /> </td>\n";
|
||||
}
|
||||
else { // data for installation
|
||||
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'>
|
||||
<input type='checkbox' name='name[".$j."][extension]' value='".$result[2]."' />
|
||||
<input type='hidden' name='name[".$j."][truename]' value='".$result[0]."' />
|
||||
<input type='hidden' name='name[".$j."][command1]' value='".$result[3]."' />
|
||||
<input type='hidden' name='name[".$j."][command2]' value='".$result[4]."' />
|
||||
</td>\n";
|
||||
// check if current architecture, plattform is supported
|
||||
// architectures: x86, x64, rpi
|
||||
// platforms: embedded, full, livecd, liveusb
|
||||
if (!empty($result[6]) && ((strpos($result[6], $arch) >= 0) || (strpos($result[6], $platform) >= 0))) {
|
||||
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'> <img src='status_disabled.png' border='0' alt='' title='".gettext('Unsupported architecture/platform')."' /> </td>\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
// check if extension is already installed (existing config.xml entry or, for command line tools, based on installation directory)
|
||||
if ((isset($config[$result[2]])) || ((strpos($result[2], "/") == 0) && (is_dir("{$config['onebuttoninstaller']['storage_path']}{$result[2]}")))){
|
||||
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'> <img src='status_enabled.png' border='0' alt='' title='".gettext('Enabled')."' /> </td>\n";
|
||||
}
|
||||
else { // data for installation
|
||||
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'>
|
||||
<input type='checkbox' name='name[".$j."][extension]' value='".$result[2]."' />
|
||||
<input type='hidden' name='name[".$j."][truename]' value='".$result[0]."' />
|
||||
<input type='hidden' name='name[".$j."][command1]' value='".$result[3]."' />
|
||||
<input type='hidden' name='name[".$j."][command2]' value='".$result[4]."' />
|
||||
</td>\n";
|
||||
} // EOinstallation
|
||||
} // EOsupported
|
||||
} // EOcount
|
||||
else echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'>" . $result[$loginfo['columns'][$i]['pmid']] . "</td>\n";
|
||||
}
|
||||
} // EOcolumns
|
||||
echo "</tr>\n";
|
||||
$j++;
|
||||
}
|
||||
@@ -149,7 +158,7 @@ if (isset($_POST['install'], $_POST['name'])) {
|
||||
} // EOforeach
|
||||
} // EOinstall
|
||||
|
||||
if (isset($_POST['update'])) {
|
||||
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);
|
||||
if ($return_val == 0) $savemsg .= gettext("New extensions list successfully downloaded!")."<br />";
|
||||
else $errormsg .= gettext("Unable to retrieve extensions list from server!")."<br />";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Extended GUI###0.5.1.2###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 && echo "fetch OK"###extended-gui/extended-gui-install.php###Extension for NAS4Free with several improvements for the WebGUI and additional functions. Most of the extension affects STATUS | SYSTEM view but also STATUS | GRAPH and DIAGNOSTICS | LOG which got a new entry NOTIFICATIONS.<br><br>The extension works on all plattforms (x86 & x64, ARM, embedded & full), does not need jail or pkg_add, enhance pages of the NAS4Free WebGUI, features configuration and extension maintenance (update & removal inside the WebGUI), let you switch between STANDARD (original) and EXTENDED WebGUI view and let you easily configure/enable/disable views and additional functions.<br>For more information -> <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=6405' target='_blank'>NAS4Free Forum</a>
|
||||
Downloady###0.1###downloady###mkdir -p downloady/log && cd downloady && fetch -v https://raw.github.com/crestAT/nas4free-downloady/master/downloady/downloady-install.php && chmod 770 downloady*install.php && echo "fetch OK"###downloady/downloady-install.php###Simple PHP download manager which is fully integrated into the NAS4Free WebGUI.<br><br>Downloady for NAS4Free is based on Downloady - the PHP Download Manager by CyberLeo@cyberLeo Projects and features downloads from http, https and ftp sites as well as download bandwith managment, resume downloads after system startup and a simple scheduler. The extension 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.
|
||||
RRDGraphs###0.3.1###rrdgraphs###mkdir -p rrdgraphs && cd rrdgraphs && fetch https://raw.github.com/crestAT/nas4free-rrdtool/master/rrdgraphs/rrd-install.php && chmod 770 rrd*install.php && echo "fetch OK"###rrdgraphs/rrd-install.php###Extension to install / configure / update and remove RRDTool based graphs for NAS4Free servers.<br><br>The extension is based on RRDtool and provides graphs for CPU frequency, CPU temperature, CPU usage, Disk usage (recognition of all mountpoints/shares automatically at RRDG startup), Load averages, Memory usage, Network latency, Network traffic, Processes, UPS, Uptime and ZFS ARC.<br><br>The extension is compatible with all versions (9.1.x - 10.x) of NAS4Free except on ARM boxes and works on all plattforms (x86 & x64, embedded & full), does not need jail or pkg_add, add pages to NAS4Free Web GUI extensions, features configuration and extension maintenance (update & removal inside the WebGUI) and is able to work on RAM drives to take care of your HDDs/USB pen drives.<br>For more information -> <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=8299' target='_blank'>NAS4Free Forum</a>
|
||||
BitTorrent Sync###0.6.4.2###btsync###mkdir -p btsync && cd btsync && fetch https://raw.github.com/crestAT/nas4free-bittorrent-sync/master/bts-install.php && chmod 770 bts*install.php && echo "fetch OK"###btsync/bts-install.php###Extension to install / configure / backup / update / manage and remove BitTorrent Sync application on NAS4Free servers.<br><br>The extension can be used with BitTorrent Sync 1.4.x (last version was 1.4.111) as well as 2.x, is compatible with all versions (9.1.x - 10.x) of NAS4Free except on ARM boxes, works on all plattforms (embedded, full), does not need jail or pkg_add, add pages to NAS4Free Web GUI extensions, features configuration, application update & backup management, extension mantenance (update & removal) and log view with filter and search capability.<br><br><b>Note:</b> Standard BitTorrent Sync version is based on 2.x releases, to use the latest 1.x release open Extensions | BitTorrent Sync | Maintenance and change the Download URL for version <b>1.4.111:</b><br><b>64 bit: </b>http://syncapp.bittorrent.com/1.4.111/btsync_freebsd_x64-1.4.111.tar.gz<br><b>32 bit: </b>http://syncapp.bittorrent.com/1.4.111/btsync_freebsd_i386-1.4.111.tar.gz<br>and hit Save URL, Fetch and Install.<br>For more information -> <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=5704' target='_blank'>NAS4Free Forum</a>
|
||||
Syncthing###0.1.4###syncthing###fetch https://raw.github.com/crestAT/nas4free-syncthing/master/stg-install.php && chmod 770 stg*install.php && echo "fetch OK"###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>For more information -> <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=7821' target='_blank'>NAS4Free Forum</a>
|
||||
BitTorrent Sync###0.6.4.2###btsync###mkdir -p btsync && cd btsync && fetch https://raw.github.com/crestAT/nas4free-bittorrent-sync/master/bts-install.php && chmod 770 bts*install.php && echo "fetch OK"###btsync/bts-install.php###Extension to install / configure / backup / update / manage and remove BitTorrent Sync application on NAS4Free servers.<br><br>The extension can be used with BitTorrent Sync 1.4.x (last version was 1.4.111) as well as 2.x, is compatible with all versions (9.1.x - 10.x) of NAS4Free except on ARM boxes, works on all plattforms (embedded, full), does not need jail or pkg_add, add pages to NAS4Free Web GUI extensions, features configuration, application update & backup management, extension mantenance (update & removal) and log view with filter and search capability.<br><br><b>Note:</b> Standard BitTorrent Sync version is based on 2.x releases, to use the latest 1.x release open Extensions | BitTorrent Sync | Maintenance and change the Download URL for version <b>1.4.111:</b><br><b>64 bit: </b>http://syncapp.bittorrent.com/1.4.111/btsync_freebsd_x64-1.4.111.tar.gz<br><b>32 bit: </b>http://syncapp.bittorrent.com/1.4.111/btsync_freebsd_i386-1.4.111.tar.gz<br>and hit Save URL, Fetch and Install.<br>For more information -> <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=5704' target='_blank'>NAS4Free Forum</a>###rpi
|
||||
Syncthing###0.1.4###syncthing###fetch https://raw.github.com/crestAT/nas4free-syncthing/master/stg-install.php && chmod 770 stg*install.php && echo "fetch OK"###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>For more information -> <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=7821' target='_blank'>NAS4Free Forum</a>###rpi
|
||||
TheBrig###0.92###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>For more information -> <a href='http://forums.nas4free.org/viewtopic.php?f=79&t=3894' target='_blank'>NAS4Free Forum</a>
|
||||
DNSMasq DHCP Server###0.2###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###-###DNSMasq DHCP Server extension for NAS4Free.<br><br>For more information -> <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=3002' target='_blank'>NAS4Free Forum</a>
|
||||
Midnight Commander###2015-02-21###/midnightcommander###mkdir -p midnightcommander && cd midnightcommander && cp /usr/local/www/ext/onebuttoninstaller/mcommander.sh . && echo "copy OK" && chmod u+x mcommander.sh && echo "chmod OK" && `pwd`/mcommander.sh###-###Midnight Commander for NAS4Free.<br><br>After the 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>For more information -> <a href='http://forums.nas4free.org/viewtopic.php?f=70&t=187' target='_blank'>NAS4Free Forum</a>
|
||||
Midnight Commander###2015-02-21###/midnightcommander###mkdir -p midnightcommander && cd midnightcommander && cp /usr/local/www/ext/onebuttoninstaller/mcommander.sh . && echo "copy OK" && chmod u+x mcommander.sh && echo "chmod OK" && `pwd`/mcommander.sh###-###Midnight Commander for NAS4Free.<br><br>After the 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>For more information -> <a href='http://forums.nas4free.org/viewtopic.php?f=70&t=187' target='_blank'>NAS4Free Forum</a>###rpi
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
*/
|
||||
/*
|
||||
Version Date Description
|
||||
0.1-b2 2016.02.01 N: check for supported architecture, plattform
|
||||
N: auto update of extensions list
|
||||
0.1-b1 2016.01.28 real install/update from GitHub
|
||||
0.1-a6 2016.01.28 include spinner with overlay
|
||||
0.1-a5 2016.01.27 output buffering working now
|
||||
@@ -38,7 +40,7 @@ Version Date Description
|
||||
0.1-a1 2016.01.16 initial release
|
||||
|
||||
*/
|
||||
$v = "v0.1-b1"; // extension version
|
||||
$v = "v0.1-b2"; // extension version
|
||||
$appname = "OneButtonInstaller";
|
||||
|
||||
require_once("config.inc");
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Version Date Description
|
||||
0.1-b2 2016.02.01 N: check for supported architecture, plattform
|
||||
N: auto update of extensions list
|
||||
0.1-b1 2016.01.29 beta release
|
||||
0.1-a1 2016.01.19 alpha release
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.1-b1
|
||||
0.1-b2
|
||||
|
||||
Reference in New Issue
Block a user