Load ex_syslog and copy pleroma_ctl
authorrinpatch <rinpatch@sdf.org>
Sat, 8 Jun 2019 14:17:10 +0000 (17:17 +0300)
committerrinpatch <rinpatch@sdf.org>
Sat, 8 Jun 2019 14:17:10 +0000 (17:17 +0300)
mix.exs

diff --git a/mix.exs b/mix.exs
index 9447a2e4f955ae6f06d614d9901fe7ee27ebf58c..a6481bab6299ef06fcb8b0f6b49b1ac955f518ac 100644 (file)
--- a/mix.exs
+++ b/mix.exs
@@ -32,10 +32,22 @@ defmodule Pleroma.Mixfile do
         ],
         main: "readme",
         output: "priv/static/doc"
+      ],
+      releases: [
+        pleroma: [
+          include_executables_for: [:unix],
+          applications: [ex_syslogger: :load, syslog: :load],
+          steps: [:assemble, &copy_pleroma_ctl/1]
+        ]
       ]
     ]
   end
 
+  def copy_pleroma_ctl(%{path: target_path} = release) do
+    File.cp!("./rel/pleroma_ctl", Path.join([target_path, "bin", "pleroma_ctl"]))
+    release
+  end
+
   # Configuration for the OTP application.
   #
   # Type `mix help compile.app` for more information.