From 829d9997d31929b45384808f7cca343edb00b0d2 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 6 Nov 2016 14:04:06 +0100 Subject: Fix small bugs in install Small fixes in install (e.g. better check that DB password works) --- cli/do-install.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cli/do-install.php') diff --git a/cli/do-install.php b/cli/do-install.php index 667191680..b687b86cb 100755 --- a/cli/do-install.php +++ b/cli/do-install.php @@ -26,9 +26,9 @@ $dBparams = array( $options = getopt('', array_merge($params, $dBparams)); -if (empty($options['default_user']) || empty($options['auth_type'])) { - fail('Usage: ' . basename(__FILE__) . " --default_user admin --auth_type form" . - " ( --environment production --base_url https://rss.example.net/" . +if (empty($options['default_user'])) { + fail('Usage: ' . basename(__FILE__) . " --default_user admin ( --auth_type form" . + " --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 )"); @@ -51,7 +51,7 @@ if (!ctype_alnum($options['default_user'])) { fail('FreshRSS invalid default username (must be ASCII alphanumeric): ' . $options['default_user']); } -if (!in_array($options['auth_type'], array('form', 'http_auth', 'none'))) { +if (isset($options['auth_type']) && !in_array($options['auth_type'], array('form', 'http_auth', 'none'))) { fail('FreshRSS invalid authentication method (auth_type must be one of { form, http_auth, none }: ' . $options['auth_type']); } @@ -86,11 +86,11 @@ if (file_put_contents(join_path(DATA_PATH, 'config.php'), " Date: Sun, 6 Nov 2016 14:23:41 +0100 Subject: Underscore missing in documentation https://github.com/FreshRSS/FreshRSS/pull/1363 --- cli/README.md | 2 +- cli/do-install.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/do-install.php') diff --git a/cli/README.md b/cli/README.md index 25b12234c..e4d3409a2 100644 --- a/cli/README.md +++ b/cli/README.md @@ -36,7 +36,7 @@ cd /usr/share/FreshRSS # --auth_type can be: 'form' (default), 'http_auth' (using the Web server access control), 'none' (dangerous) # --db-type can be: 'sqlite' (default), 'mysql' (MySQL or MariaDB), 'pgsql' (PostgreSQL) # --environment can be: 'production' (default), 'development' (for additional log messages) -# --db-prefix is an optional prefix in front of the names of the tables +# --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/create-user.php --user username ( --password 'password' --api-password 'api_password' --language en --email user@example.net --token 'longRandomString' --no-default-feeds ) diff --git a/cli/do-install.php b/cli/do-install.php index b687b86cb..100d4947f 100755 --- a/cli/do-install.php +++ b/cli/do-install.php @@ -31,7 +31,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_ )"); } fwrite(STDERR, 'FreshRSS install…' . "\n"); -- cgit v1.2.3