2 Commits
v0.3 ... v0.3.1

Author SHA1 Message Date
crestAT
4f8c2385f0 v0.3.1 (#1)
* v0.3.1

update for path_check

* v0.3.1

update strings

* v0.3.1

remove test code

* v0.3.1

update release strings
2016-08-15 07:47:46 +02:00
crestAT
db32583c34 v0.3 2016-08-14 09:13:25 +02:00
18 changed files with 17 additions and 14 deletions

View File

@@ -76,12 +76,13 @@ if (isset($_POST['save']) && $_POST['save']) {
if (empty($input_errors)) {
$config['onebuttoninstaller']['storage_path'] = !empty($_POST['storage_path']) ? $_POST['storage_path'] : $g['media_path'];
$config['onebuttoninstaller']['storage_path'] = rtrim($config['onebuttoninstaller']['storage_path'],'/'); // ensure to have NO trailing slash
if (strpos($config['onebuttoninstaller']['storage_path'], "/mnt/") === false) {
if (!isset($_POST['path_check']) && (strpos($config['onebuttoninstaller']['storage_path'], "/mnt/") === false)) {
$input_errors[] = gettext("The common directory for all extensions MUST be set to a directory below <b>'/mnt/'</b> to prevent to loose the extensions after a reboot on embedded systems!");
}
else {
if (!is_dir($config['onebuttoninstaller']['storage_path'])) mkdir($config['onebuttoninstaller']['storage_path'], 0775, true);
change_perms($config['onebuttoninstaller']['storage_path']);
$config['onebuttoninstaller']['path_check'] = isset($_POST['path_check']) ? true : false;
$install_dir = $config['onebuttoninstaller']['storage_path']."/"; // get directory where the installer script resides
if (!is_dir("{$install_dir}onebuttoninstaller/log")) { mkdir("{$install_dir}onebuttoninstaller/log", 0775, true); }
$return_val = mwexec("fetch {$verify_hostname} -vo {$install_dir}onebuttoninstaller/onebuttoninstaller-install.php 'https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/onebuttoninstaller-install.php'", true);
@@ -91,7 +92,7 @@ if (isset($_POST['save']) && $_POST['save']) {
}
else {
$input_errors[] = sprintf(gettext("Installation file %s not found, installation aborted!"), "{$install_dir}onebuttoninstaller/onebuttoninstaller-install.php");
exit;
return;
}
mwexec("rm -Rf ext/OBI; rm -f OBI.php", true);
header("Location:onebuttoninstaller-config.php");
@@ -107,6 +108,7 @@ if (isset($_POST['cancel']) && $_POST['cancel']) {
}
$pconfig['storage_path'] = !empty($config['onebuttoninstaller']['storage_path']) ? $config['onebuttoninstaller']['storage_path'] : $g['media_path'];
$pconfig['path_check'] = isset($config['onebuttoninstaller']['path_check']) ? true : false;
include("fbegin.inc"); ?>
<form action="OBI.php" method="post" name="iform" id="iform">
@@ -117,7 +119,7 @@ include("fbegin.inc"); ?>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<?php html_titleline($application);?>
<?php html_filechooser("storage_path", gettext("Common directory"), $pconfig['storage_path'], gettext("Common directory for all extensions (a persistant place where all extensions are/should be - a directory below <b>/mnt/</b>)."), $pconfig['storage_path'], true, 60);?>
</table>
<?php html_checkbox("path_check", gettext("Path check"), $pconfig['path_check'], gettext("If this option is selected no examination of the common directory path will be carried out (whether it was set to a directory below /mnt/)."), "<b><font color='red'>".gettext("Please use this option only if you know what you are doing!")."</font></b>", false);?> </table>
<div id="submit">
<input id="save" name="save" type="submit" class="formbtn" value="<?=gettext("Save");?>"/>
<input id="cancel" name="cancel" type="submit" class="formbtn" value="<?=gettext("Cancel");?>"/>

View File

@@ -92,11 +92,11 @@ if (isset($_POST['save']) && $_POST['save']) {
$config['onebuttoninstaller']['path_check'] = isset($_POST['path_check']) ? true : false;
$config['onebuttoninstaller']['auto_update'] = isset($_POST['auto_update']) ? true : false;
$config['onebuttoninstaller']['show_beta'] = isset($_POST['show_beta']) ? true : false;
$savemsg .= get_std_save_message(write_config());
$savemsg .= get_std_save_message(write_config())." ";
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-start.php");
}
}
else $savemsg .= get_std_save_message(write_config());
else $savemsg .= get_std_save_message(write_config())." ";
} // end of empty input_errors
}
@@ -109,7 +109,7 @@ $pconfig['show_beta'] = isset($config['onebuttoninstaller']['show_beta']) ? true
$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, use '%s' to install the new version!"), $server_version, gettext("Maintenance")); }
if ($server_version != $config['onebuttoninstaller']['version']) { $savemsg .= sprintf(gettext("New extension version %s available, push '%s' button to install the new version!"), $server_version, gettext("Maintenance")); }
} //EOversion-check
bindtextdomain("nas4free", "/usr/local/share/locale"); // to get the right main menu language
@@ -148,7 +148,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 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/)."), gettext("Please use this option only if you know what you are doing!"), false);?>
<?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("auto_update", gettext("Update"), $pconfig['auto_update'], gettext("Update extensions list automatically."), "", false);?>
<?php html_checkbox("show_beta", gettext("Beta releases"), $pconfig['show_beta'], gettext("If enabled, extensions in beta state will be shown in the extensions list."), "", false);?>
</table>

View File

@@ -40,7 +40,7 @@ if (is_file("{$config['onebuttoninstaller']['rootfolder']}log/oneload")) { requi
$return_val = mwexec("fetch -o {$config['onebuttoninstaller']['rootfolder']}log/version.txt https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/version.txt", true);
if ($return_val == 0) {
$server_version = exec("cat {$config['onebuttoninstaller']['rootfolder']}log/version.txt");
if ($server_version != $config['onebuttoninstaller']['version']) { $savemsg = sprintf(gettext("New extension version %s available, push '%s' button to install the new version!"), $server_version, gettext("Update Extension")); }
if ($server_version != $config['onebuttoninstaller']['version']) { $savemsg .= sprintf(gettext("New extension version %s available, push '%s' button to install the new version!"), $server_version, gettext("Update Extension")); }
mwexec("fetch -o {$config['onebuttoninstaller']['rootfolder']}release_notes.txt https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/release_notes.txt", false);
}
else { $server_version = gettext("Unable to retrieve version from server!"); }

View File

@@ -211,7 +211,7 @@ if (isset($_POST['update']) || (isset($config['onebuttoninstaller']['auto_update
$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, use '%s' to install the new version!"), $server_version, gettext("Maintenance")); }
if ($server_version != $config['onebuttoninstaller']['version']) { $savemsg .= sprintf(gettext("New extension version %s available, push '%s' button to install the new version!"), $server_version, gettext("Maintenance")); }
} //EOversion-check
if (!is_file("{$config['onebuttoninstaller']['rootfolder']}extensions.txt")) $errormsg .= sprintf(gettext("File %s not found!"), "{$config['onebuttoninstaller']['rootfolder']}extensions.txt")."<br />";

View File

@@ -29,7 +29,7 @@
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
*/
$v = "v0.3"; // extension version
$v = "v0.3.1"; // extension version
$appname = "OneButtonInstaller";
require_once("config.inc");

View File

@@ -32,5 +32,5 @@
$extension_dir = "/usr/local/www";
mwexec("rm -Rf {$extension_dir}/onebuttoninstaller*", true);
mwexec("rm -Rf {$extension_dir}/ext/onebuttoninstaller", true);
exec("logger onebuttoninstaller: stopped");
exec("logger onebuttoninstaller: stopped");
?>

View File

@@ -1,5 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
require_once("config.inc");
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-start.php");
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-start.php");
?>

View File

@@ -1,5 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
require_once("config.inc");
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-stop.php");
require_once("{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-stop.php");
?>

View File

@@ -1,4 +1,5 @@
Version Date Description
0.3.1 2016.08.15 F: OBI installer - add checkbox to override restriction for extensions installation path
0.3 2016.08.14 N: configuration - checkbox to override restriction for extensions installation path
(limited to a directory under /mnt/)
0.2 2016.08.09 N: configuration - enable/disable beta releases in extensions list

View File

@@ -1 +1 @@
0.3
0.3.1