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 akkoma_chdir
="${akkoma_home}/akkoma"
17 akkoma_env
="HOME=${akkoma_home} MIX_ENV=prod ERL_EPMD_ADDRESS=127.0.0.1"
21 pid
=$(pgrep -U "${akkoma_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]"