forked from AkkomaGang/akkoma
Move gen.instance to instance.ex
This commit is contained in:
parent
7983b0bdfe
commit
faf1f2b304
1 changed files with 10 additions and 7 deletions
|
@ -1,14 +1,16 @@
|
||||||
defmodule Mix.Tasks.Pleroma.Gen.Instance do
|
defmodule Mix.Tasks.Pleroma.Instance do
|
||||||
use Mix.Task
|
use Mix.Task
|
||||||
|
alias Pleroma.{Repo, User}
|
||||||
|
|
||||||
@shortdoc "Generates the configuration for a new instance"
|
@shortdoc "Manages Pleroma instance"
|
||||||
@moduledoc """
|
@moduledoc """
|
||||||
Generates the configuration for a new instance.
|
Manages Pleroma instance.
|
||||||
|
|
||||||
If any options are left unspecified, you will be prompted interactively. This
|
## Generate a new instance.
|
||||||
means the simplest invocation would be
|
|
||||||
|
|
||||||
mix pleroma.gen.instance
|
mix pleroma.instance new [OPTION...]
|
||||||
|
|
||||||
|
If any options are left unspecified, you will be prompted interactively
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
|
@ -24,7 +26,7 @@ defmodule Mix.Tasks.Pleroma.Gen.Instance do
|
||||||
- `--dbpass DBPASS` - the password to use for the database connection
|
- `--dbpass DBPASS` - the password to use for the database connection
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def run(rest) do
|
def run(["new" | rest]) do
|
||||||
{options, [], []} =
|
{options, [], []} =
|
||||||
OptionParser.parse(
|
OptionParser.parse(
|
||||||
rest,
|
rest,
|
||||||
|
@ -159,3 +161,4 @@ defmodule Mix.Tasks.Pleroma.Gen.Instance do
|
||||||
~S(') <> String.replace(path, ~S('), ~S(\')) <> ~S(')
|
~S(') <> String.replace(path, ~S('), ~S(\')) <> ~S(')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue