aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks/pleroma/instance.ex
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2019-06-14 15:45:05 +0000
committerkaniini <nenolod@gmail.com>2019-06-14 15:45:05 +0000
commit270f09dbc2cb145e5a06b72189bd1b91dd3d3a02 (patch)
treebf75fc306788d784d74fb6ca617f3ddd27b75fd2 /lib/mix/tasks/pleroma/instance.ex
parentb7fc722a2e9e93341229cb122aac605421782295 (diff)
parentc2ca1f22a25d22d6d863406ed05b08c643e5824c (diff)
downloadpleroma-270f09dbc2cb145e5a06b72189bd1b91dd3d3a02.tar.gz
Merge branch 'feature/905-dynamic-configuration-in-sql' into 'develop'
Feature/905 dynamic configuration in sql Closes #905 See merge request pleroma/pleroma!1195
Diffstat (limited to 'lib/mix/tasks/pleroma/instance.ex')
-rw-r--r--lib/mix/tasks/pleroma/instance.ex15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/mix/tasks/pleroma/instance.ex b/lib/mix/tasks/pleroma/instance.ex
index 88925dbaf..44e49cb69 100644
--- a/lib/mix/tasks/pleroma/instance.ex
+++ b/lib/mix/tasks/pleroma/instance.ex
@@ -30,6 +30,7 @@ defmodule Mix.Tasks.Pleroma.Instance do
- `--dbuser DBUSER` - the user (aka role) to use for the database connection
- `--dbpass DBPASS` - the password to use for the database connection
- `--indexable Y/N` - Allow/disallow indexing site by search engines
+ - `--db-configurable Y/N` - Allow/disallow configuring instance from admin part
"""
def run(["gen" | rest]) do
@@ -48,7 +49,8 @@ defmodule Mix.Tasks.Pleroma.Instance do
dbname: :string,
dbuser: :string,
dbpass: :string,
- indexable: :string
+ indexable: :string,
+ db_configurable: :string
],
aliases: [
o: :output,
@@ -101,6 +103,14 @@ defmodule Mix.Tasks.Pleroma.Instance do
"y"
) === "y"
+ db_configurable? =
+ Common.get_option(
+ options,
+ :db_configurable,
+ "Do you want to be able to configure instance from admin part? (y/n)",
+ "y"
+ ) === "y"
+
dbhost =
Common.get_option(options, :dbhost, "What is the hostname of your database?", "localhost")
@@ -144,7 +154,8 @@ defmodule Mix.Tasks.Pleroma.Instance do
secret: secret,
signing_salt: signing_salt,
web_push_public_key: Base.url_encode64(web_push_public_key, padding: false),
- web_push_private_key: Base.url_encode64(web_push_private_key, padding: false)
+ web_push_private_key: Base.url_encode64(web_push_private_key, padding: false),
+ db_configurable?: db_configurable?
)
result_psql =