Mix: Don't start esshd application if we don't need it.
authorlain <lain@soykaf.club>
Wed, 22 May 2019 08:28:50 +0000 (10:28 +0200)
committerlain <lain@soykaf.club>
Wed, 22 May 2019 08:28:50 +0000 (10:28 +0200)
mix.exs

diff --git a/mix.exs b/mix.exs
index 95c052c34fd4fb50658f2a4df33bbe1c44b2d671..bc5b6204f4e5f0b7478b3f52ee02fff4cd7bf5dc 100644 (file)
--- a/mix.exs
+++ b/mix.exs
@@ -40,9 +40,16 @@ defmodule Pleroma.Mixfile do
   #
   # Type `mix help compile.app` for more information.
   def application do
+    extra_applications = [:logger, :runtime_tools, :comeonin, :quack]
+    extra_applications = if Application.get_env(:esshd, :enabled, false) do
+      [:esshd | extra_applications]
+    else
+      extra_applications
+    end
+
     [
       mod: {Pleroma.Application, []},
-      extra_applications: [:logger, :runtime_tools, :comeonin, :esshd, :quack],
+      extra_applications: extra_applications,
       included_applications: [:ex_syslogger]
     ]
   end