Skip to content

Commit

Permalink
initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
crestAT committed Aug 1, 2016
1 parent c4f1bfd commit ca035af
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 35 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ OneButtonInstaller
------------------

Description in the NAS4Free forum -> <a href="http://forums.nas4free.org">OneButtonInstaller</a>

2 changes: 2 additions & 0 deletions onebuttoninstaller/ext/ext/onebuttoninstaller/spinner.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Copyright (c) 2015 - 2016 Andreas Schmidhuber
All rights reserved.

Uses spin.js by Felix Gnass (fgnass) at http://spin.js.org

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Expand Down
65 changes: 45 additions & 20 deletions onebuttoninstaller/ext/onebuttoninstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@
))
);

// create FreeBSD $current_release for min_release check
$product_version = explode(".", get_product_version());
$current_release = $product_version[0].".".$product_version[1].$product_version[2].$product_version[3].get_product_revision();

function check_min_release($min_release) {
global $current_release;
if (is_float(floatval($min_release))) {
if ($current_release < floatval($min_release)) return false; // release not supported
else return true; // release supported
}
else return true; // not a float, no release
}
//$sup="10.3032898"; // CHECK
//if (check_min_release($sup)) $savemsg .= "{$sup} = SUPPORTED";
//else $savemsg .= "{$sup} = NOT SUPPORTED";

function log_get_contents($logfile) {
$content = array();
if (is_file($logfile)) exec("cat {$logfile}", $extensions);
Expand Down Expand Up @@ -94,9 +110,7 @@ function log_display($loginfo) {
$content = log_get_contents($loginfo['logfile']);
if (empty($content)) return;
sort($content);

$j = 0;

/*
* EXTENSIONS.TXT format description: PARAMETER DELIMITER -> ###
* PMID COMMENT
Expand All @@ -106,9 +120,11 @@ 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
* unsupported 6 unsupported architecture, plattform, release
* architectures: x86, x64, rpi, rpi2, bananapi
* platforms: embedded, full, livecd, liveusb
* releases: 9.3, 10.2, 10.3032853, 10.3032898, 11.0, ...
*/

// Create table data
foreach ($content as $contentv) { // handle each line => one extension
unset($result);
Expand All @@ -117,26 +133,32 @@ 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 current architecture, plattform is supported
// architectures: x86, x64, rpi
// platforms: embedded, full, livecd, liveusb
if (!empty($result[6]) && ((strpos($result[6], $g['arch']) !== false) || (strpos($result[6], $g['platform']) !== false))) {
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'> <img src='{$image_path}status_disabled.png' border='0' alt='' title='".gettext('Unsupported architecture/platform').': '.$result[6]."' /></td>\n";
// check if extension is already installed (existing config.xml or postinit cmd entry)
if ((isset($config[$result[2]])) || (log_get_status($result[2]) == 1)) {
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'> <img src='{$image_path}status_enabled.png' border='0' alt='' title='".gettext('Enabled')."' /></td>\n";
}
else {
// check if extension is already installed (existing config.xml or postinit cmd entry)
if ((isset($config[$result[2]])) || (log_get_status($result[2]) == 1)) {
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'> <img src='{$image_path}status_enabled.png' border='0' alt='' title='".gettext('Enabled')."' /></td>\n";
}
else { // data for installation
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}' title='".gettext('Select to install')."' >
else { // not installed
$supported_app = true;
if (!empty($result[6])) { // something unsupported exist
$unsupported = explode(",", str_replace(" ", "", $result[6]));
for ($k = 0; $k < count($unsupported); $k++) { // check for unsupported release / architecture / platforms
if (!check_min_release($unsupported[$k]) || ($unsupported[$k] == $g['arch']) || ($unsupported[$k] == $g['platform'])) {
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'> <img src='{$image_path}status_disabled.png' border='0' alt='' title='".gettext('Unsupported architecture/platform/release').': '.$unsupported[$k]."' /></td>\n";
$supported_app = false;
break;
}
}
}
if ($supported_app === true) {
// data for installation
echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}' title='".gettext('Select to install')."' >
<input type='checkbox' name='name[".$j."][extension]' value='".$result[2]."' />
<input type='hidden' name='name[".$j."][truename]' value='".$result[0]."' />
<input type='hidden' name='name[".$j."][command1]' value='".$result[3]."' />
<input type='hidden' name='name[".$j."][command2]' value='".$result[4]."' />
</td>\n";
} // EOinstallation
} // EOsupported
</td>\n";
}
} // EOnot-installed
} // EOcount
else echo "<td {$loginfo['columns'][$i]['param']} class='{$loginfo['columns'][$i]['class']}'>" . $result[$loginfo['columns'][$i]['pmid']] . "</td>\n";
} // EOcolumns
Expand Down Expand Up @@ -209,7 +231,10 @@ function log_display($loginfo) {
?>
</table>
<div id="remarks">
<?php html_remark("note", gettext("Note"), gettext("After successful installation extensions can be found under the 'Extensions' entry in the navigation bar.")."<br /><b>".gettext("Some extensions need to finish their installation procedures on their own extension page before they will be shown as installed!")."</b>");?>
<?php html_remark("note", gettext("Note"), gettext("After successful installation extensions can be found under the 'Extensions' entry in the navigation bar.")."<br /><b>".gettext("Some extensions need to finish their installation procedures on their own extension page before they will be shown as installed!")."</b><br /><br />");?>
<?php html_remark("legend", sprintf(gettext("Icons in the %s column"), gettext("Install")), "");?>
<img src='images/status_disabled.png' border='0' alt='' title='' />&nbsp;&nbsp;&nbsp;<?php echo "... ".gettext("The extension can not be installed because of an unsupported architecture/platform/release of the system. Hover with the mouse over the icon to see what is unsupported.");?><br />
<img src='images/status_enabled.png' border='0' alt='' title='' />&nbsp;&nbsp;&nbsp;<?php echo "... ".gettext("The extension is already installed."); ?><br /><br />
</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?");?>')" />
Expand Down
9 changes: 4 additions & 5 deletions onebuttoninstaller/extensions.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
Extended GUI###<font color="green">RELEASE<br>0.5.2.1</font>###extended-gui###mkdir -p extended-gui/backup && mkdir -p extended-gui/log && cd extended-gui && fetch https://raw.github.com/crestAT/nas4free-extended-gui/master/extended-gui/extended-gui-install.php && chmod 770 extended-gui*install.php###extended-gui/extended-gui-install.php###Extension for NAS4Free with several improvements for the WebGUI and additional functions. Most of the extension affects STATUS | SYSTEM view but also STATUS | GRAPH and DIAGNOSTICS | LOG which got a new entry NOTIFICATIONS.<br><br>The extension works on all plattforms (x86 & x64, ARM, embedded & full), does not need jail or pkg_add, enhance pages of the NAS4Free WebGUI, features configuration and extension maintenance (update & removal inside the WebGUI), let you switch between STANDARD (original) and EXTENDED WebGUI view and let you easily configure/enable/disable views and additional functions.<br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=6405' target='_blank'>NAS4Free Forum</a>
Downloady###<font color="green">RELEASE<br>0.1</font>###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###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.
Extended GUI###<font color="green">RELEASE<br>0.5.3</font>###extended-gui###mkdir -p extended-gui/backup && mkdir -p extended-gui/log && cd extended-gui && fetch https://raw.github.com/crestAT/nas4free-extended-gui/master/extended-gui/extended-gui-install.php && chmod 770 extended-gui*install.php###extended-gui/extended-gui-install.php###Extension for NAS4Free with several improvements for the WebGUI and additional functions. Most of the extension affects STATUS | SYSTEM view but also STATUS | GRAPH and DIAGNOSTICS | LOG which got a new entry NOTIFICATIONS.<br><br>The extension works on all plattforms (x86 & x64, ARM, embedded & full), does not need jail or pkg_add, enhance pages of the NAS4Free WebGUI, features configuration and extension maintenance (update & removal inside the WebGUI), let you switch between STANDARD (original) and EXTENDED WebGUI view and let you easily configure/enable/disable views and additional functions.<br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=6405' target='_blank'>NAS4Free Forum</a>###10.3032853
RRDGraphs###<font color="green">RELEASE<br>0.3.2</font>###rrdgraphs###mkdir -p rrdgraphs && cd rrdgraphs && fetch https://raw.github.com/crestAT/nas4free-rrdtool/master/rrdgraphs/rrd-install.php && chmod 770 rrd*install.php###rrdgraphs/rrd-install.php###Extension to install / configure / update and remove RRDTool based graphs for NAS4Free servers.<br><br>The extension is based on RRDtool and provides graphs for CPU frequency, CPU temperature, CPU usage, Disk usage (recognition of all mountpoints/shares automatically at RRDG startup), Load averages, Memory usage, Network latency, Network traffic, Processes, UPS, Uptime and ZFS ARC.<br><br>The extension is compatible with all versions (9.1.x - 10.x) of NAS4Free except on ARM boxes and works on all plattforms (x86 & x64, embedded & full), does not need jail or pkg_add, add pages to NAS4Free Web GUI extensions, features configuration and extension maintenance (update & removal inside the WebGUI) and is able to work on RAM drives to take care of your HDDs/USB pen drives.<br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=8299' target='_blank'>NAS4Free Forum</a>
BitTorrent Sync###<font color="green">RELEASE<br>0.7</font>###btsync###fetch https://raw.github.com/crestAT/nas4free-bittorrent-sync/master/bts-install.php && chmod 770 bts*install.php###bts-install.php###Extension to install / configure / backup / update / manage and remove BitTorrent Sync application on NAS4Free servers.<br><br>The extension can be used with BitTorrent Sync 1.4.x (last version was 1.4.111) as well as 2.x, is compatible with all versions (9.1.x - 10.x) of NAS4Free except on ARM boxes, works on all plattforms (embedded, full), does not need jail or pkg_add, add pages to NAS4Free Web GUI extensions, features configuration, application update & backup management, extension mantenance (update & removal) and log view with filter and search capability.<br><br><font color="blue"><b>Note:</b> Standard BitTorrent Sync version is based on 2.x releases, to use the latest 1.x release open Extensions | BitTorrent Sync | Maintenance and change the Download URL for version <b>1.4.111:</b><br><b>64 bit: </b>http://syncapp.bittorrent.com/1.4.111/btsync_freebsd_x64-1.4.111.tar.gz<br><b>32 bit: </b>http://syncapp.bittorrent.com/1.4.111/btsync_freebsd_i386-1.4.111.tar.gz<br>and hit Save URL, Fetch and Install.</font><br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=5704' target='_blank'>NAS4Free Forum</a>###rpi, rpi2
Syncthing###<font color="green">RELEASE<br>0.1.5</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>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=7821' target='_blank'>NAS4Free Forum</a>###rpi, rpi2
Syncthing###<font color="green">RELEASE<br>0.1.5</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 10.2 series of NAS4Free contain Syncthing already out of the box so this extensions is mainly for older releases OR if one need older Syncthing versions (e.g. before 0.14.x for compatibility reasons with other devices.</font><br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=11110#p69469' target='_blank'>NAS4Free Forum</a>###
TheBrig###<font color="green">RELEASE<br>0.94</font>###thebrig###mkdir -p thebrig && cd thebrig && fetch https://raw.githubusercontent.com/fsbruva/thebrig/alcatraz/thebrig_install.sh && chmod a+x thebrig_install.sh && sh thebrig_install.sh###-###Jail manager extension for NAS4Free.<br><br><font color="red"><b>Note:</b> After the installation navigate to rudimentary config tab and push Save to finish the installation.</font><br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=79&t=3894' target='_blank'>NAS4Free Forum</a>
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
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
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 for bhyve 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=10433#p65157' target='_blank'>NAS4Free Forum</a>
Plex Media Server###<font color="green">RELEASE<br>4.0</font>###plexinit###cd plex && ./plexinit -o###plex/postinit###Plex Media Server Add-On for NAS4Free 10.x.<br><br>The extension works on NAS4Free Plex Media Server Add-On for NAS4Free 10.x or compatible FreeBSD based NAS solutions, don't need jail, fstab or unionfs configs, self contained and portable package, single script for management and startup, easy to upgrade/rollback while maintaining actual Plex config, Plex IP address will be locally visible by any devices.<br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=11049#p69002' target='_blank'>NAS4Free Forum</a>###x86, rpi, rpi2
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>###10.2, rpi, rpi2, bananapi
Plex Media Server###<font color="green">RELEASE<br>4.1</font>###plexinit###mkdir -p plex && cd plex && fetch https://raw.githubusercontent.com/JRGTH/nas4free-plex-extension/master/plex/plexinit && chmod 0755 plexinit && plexinit -o###plex/postinit###Plex Media Server Add-On for NAS4Free 10.x.<br><br>The extension works on NAS4Free Plex Media Server Add-On for NAS4Free 10.x or compatible FreeBSD based NAS solutions, don't need jail, fstab or unionfs configs, self contained and portable package, single script for management and startup, easy to upgrade/rollback while maintaining actual Plex config, Plex IP address will be locally visible by any devices.<br><br>Read more ... <a href='http://forums.nas4free.org/viewtopic.php?f=71&t=11049#p69002' target='_blank'>NAS4Free Forum</a>###x86, 10.0, rpi, rpi2
Binary file modified onebuttoninstaller/locale-obi/de/LC_MESSAGES/nas4free.mo
Binary file not shown.
Loading

0 comments on commit ca035af

Please sign in to comment.