2022-07-06 18:50:01 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
|
|
# PROVIDE: akkoma
|
|
|
|
# REQUIRE: DAEMON postgresql
|
|
|
|
# KEYWORD: shutdown
|
|
|
|
|
|
|
|
# sudo -u akkoma MIX_ENV=prod elixir --erl \"-detached\" -S mix phx.server
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name=akkoma
|
|
|
|
rcvar=akkoma_enable
|
|
|
|
|
|
|
|
desc="Akkoma Social Media Platform"
|
|
|
|
|
|
|
|
load_rc_config ${name}
|
|
|
|
|
|
|
|
: ${akkoma_user:=akkoma}
|
|
|
|
: ${akkoma_home:=$(getent passwd ${akkoma_user} | awk -F: '{print $6}')}
|
|
|
|
: ${akkoma_chdir:="${akkoma_home}/akkoma"}
|
2022-12-10 02:36:21 +00:00
|
|
|
: ${akkoma_env:="HOME=${akkoma_home} MIX_ENV=prod ERL_EPMD_ADDRESS=127.0.0.1"}
|
|
|
|
|
2022-07-06 18:50:01 +00:00
|
|
|
|
|
|
|
command=/usr/local/bin/elixir
|
|
|
|
command_args="--erl \"-detached\" -S /usr/local/bin/mix phx.server"
|
|
|
|
procname="*beam.smp"
|
|
|
|
|
|
|
|
run_rc_command "$1"
|