init.d/pleroma: Add option to attach an elixir console
This commit is contained in:
parent
79376abae3
commit
528069a42d
|
@ -3,8 +3,23 @@
|
|||
# Requires OpenRC >= 0.35
|
||||
directory=/opt/pleroma
|
||||
|
||||
command=/usr/bin/mix
|
||||
command_args="phx.server"
|
||||
# put my_allow_console=YES in /etc/conf.d/pleroma if you want to be able to
|
||||
# connect to pleroma via an elixir console
|
||||
if yesno "${my_allow_console}"; then
|
||||
command=elixir
|
||||
command_args="--name pleroma@127.0.0.1 --erl '-kernel inet_dist_listen_min 9001 inet_dist_listen_max 9001 inet_dist_use_interface {127,0,0,1}' -S mix phx.server"
|
||||
my_extra_deps="epmd"
|
||||
|
||||
start_post() {
|
||||
einfo "You can get a console by using this command as pleroma's user:"
|
||||
einfo "iex --name console@127.0.0.1 --remsh pleroma@127.0.0.1"
|
||||
}
|
||||
else
|
||||
command=/usr/bin/mix
|
||||
command_args="phx.server"
|
||||
my_extra_deps=""
|
||||
fi
|
||||
|
||||
command_user=pleroma:pleroma
|
||||
command_background=1
|
||||
|
||||
|
@ -17,5 +32,5 @@ retry="SIGTERM/30/SIGKILL/5"
|
|||
pidfile="/var/run/pleroma.pid"
|
||||
|
||||
depend() {
|
||||
need nginx postgresql
|
||||
need nginx postgresql "${my_extra_deps}"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue