3 # REQUIRE: DAEMON pgsql
5 if [ -f /etc/rc.subr ]; then
11 command="/usr/pkg/bin/elixir"
12 command_args="--detached -S /usr/pkg/bin/mix phx.server"
13 start_precmd="ulimit -n unlimited"
16 pleroma_chdir="${pleroma_home}/pleroma"
17 pleroma_env="HOME=${pleroma_home} MIX_ENV=prod"
21 pid=$(pgrep -U "${pleroma_user}" /bin/beam.smp$)
25 if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
27 load_rc_config ${name}
30 # ancient NetBSD, Solaris and illumos, Linux, etc...
35 echo "Starting ${name}."
40 echo "Stopping ${name}."
42 ! [ -n ${pid} ] && kill ${pid}
52 echo 1>&2 "Usage: $0 [start|stop|restart]"