From efcab77470d2571be6537a92b59fc1e44cecddb9 Mon Sep 17 00:00:00 2001 From: Dennis Schwerdel Date: Thu, 23 Feb 2017 18:53:08 +0100 Subject: Fixed empty db-prefix in do-install.php --- cli/do-install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/do-install.php b/cli/do-install.php index 100d4947f..1f9072060 100755 --- a/cli/do-install.php +++ b/cli/do-install.php @@ -73,7 +73,7 @@ if ((!empty($config['base_url'])) && server_is_public($config['base_url'])) { foreach ($dBparams as $dBparam) { $dBparam = rtrim($dBparam, ':'); - if (!empty($options[$dBparam])) { + if (isset($options[$dBparam])) { $param = substr($dBparam, strlen('db-')); $config['db'][$param] = $options[$dBparam]; } -- cgit v1.2.3 From 9e931d1bc52443aeaf9ccf7e2b3d6eaa135368ec Mon Sep 17 00:00:00 2001 From: Dennis Schwerdel Date: Fri, 24 Feb 2017 07:20:50 +0100 Subject: Added disable_update option to cli/do-install.php --- cli/do-install.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/do-install.php b/cli/do-install.php index 100d4947f..483ec5224 100755 --- a/cli/do-install.php +++ b/cli/do-install.php @@ -13,6 +13,7 @@ $params = array( 'auth_type:', 'api_enabled', 'allow_robots', + 'disable_update', ); $dBparams = array( @@ -31,7 +32,7 @@ if (empty($options['default_user'])) { " --environment production --base_url https://rss.example.net/" . " --title FreshRSS --allow_anonymous --api_enabled" . " --db-type mysql --db-host localhost:3306 --db-user freshrss --db-password dbPassword123" . - " --db-base freshrss --db-prefix freshrss_ )"); + " --db-base freshrss --db-prefix freshrss_ --disable_update )"); } fwrite(STDERR, 'FreshRSS install…' . "\n"); -- cgit v1.2.3 From 1fc3054c2f85478df53b19365c1b0ebc46c372af Mon Sep 17 00:00:00 2001 From: Dennis Schwerdel Date: Fri, 24 Feb 2017 07:54:31 +0100 Subject: Added cli tool to reconfigure FreshRSS --- cli/reconfigure.php | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 cli/reconfigure.php (limited to 'cli') diff --git a/cli/reconfigure.php b/cli/reconfigure.php new file mode 100755 index 000000000..5294dd2df --- /dev/null +++ b/cli/reconfigure.php @@ -0,0 +1,58 @@ +#!/usr/bin/php +$param = $options[$param] === false ? true : $options[$param]; + } +} +$db = $config->db; +foreach ($dBparams as $dBparam) { + $dBparam = rtrim($dBparam, ':'); + if (isset($options[$dBparam])) { + $param = substr($dBparam, strlen('db-')); + $db[$param] = $options[$dBparam]; + } +} +$config->db = $db; + +if (!ctype_alnum($config->default_user)) { + fail('FreshRSS invalid default username (must be ASCII alphanumeric): ' . $config->default_user); +} + +if (isset($config->auth_type) && !in_array($config->auth_type, array('form', 'http_auth', 'none'))) { + fail('FreshRSS invalid authentication method (auth_type must be one of { form, http_auth, none }: ' . $config->auth_type); +} + +$config->save(); + +done(); -- cgit v1.2.3 From 745f0ae0141607aaf751630e68f5685957e3d398 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 24 Feb 2017 23:21:23 +0100 Subject: Changelog 1436, 1439 https://github.com/FreshRSS/FreshRSS/issues/1424 https://github.com/FreshRSS/FreshRSS/issues/1432 https://github.com/FreshRSS/FreshRSS/pull/1436 https://github.com/FreshRSS/FreshRSS/pull/1439 --- CHANGELOG.md | 3 +++ cli/README.md | 3 +++ 2 files changed, 6 insertions(+) (limited to 'cli') diff --git a/CHANGELOG.md b/CHANGELOG.md index adbd0885b..4738b7360 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,11 @@ ## 2017-03-xx FreshRSS 1.6.3-dev * Features + * New option `disable_update` (also from CLI) to hide the system to update to new FreshRSS versions [#1436](https://github.com/FreshRSS/FreshRSS/pull/1436) * Share with Ⓚnown [#1420](https://github.com/FreshRSS/FreshRSS/pull/1420) * Share with GNU social [#1422](https://github.com/FreshRSS/FreshRSS/issues/1422) +* CLI + * New command `./cli/reconfigure.php` to update an existing installation [#1439](https://github.com/FreshRSS/FreshRSS/pull/1439) * UI * Chrome parity with Firefox: auto-focus tab when clicking on notification [#1409](https://github.com/FreshRSS/FreshRSS/pull/1409) * Bug fixing diff --git a/cli/README.md b/cli/README.md index e4d3409a2..5662e2d83 100644 --- a/cli/README.md +++ b/cli/README.md @@ -39,6 +39,9 @@ cd /usr/share/FreshRSS # --db-prefix is an optional prefix in front of the names of the tables. We suggest using 'freshrss_' # This command does not create the default user. Do that with ./cli/create-user.php +./cli/reconfigure.php +# Same parameters as for do-install.php. Used to update an existing installation. + ./cli/create-user.php --user username ( --password 'password' --api-password 'api_password' --language en --email user@example.net --token 'longRandomString' --no-default-feeds ) # --language can be: 'en' (default), 'fr', or one of the [supported languages](../app/i18n/) -- cgit v1.2.3