2020-08-06 00:01:57 -04:00
|
|
|
#!/bin/sh
|
2020-08-18 11:24:34 -04:00
|
|
|
# $FreeBSD$
|
2020-08-06 00:01:57 -04:00
|
|
|
# PROVIDE: pleroma
|
2020-08-18 11:24:34 -04:00
|
|
|
# REQUIRE: DAEMON postgresql
|
|
|
|
# KEYWORD: shutdown
|
2020-08-06 00:01:57 -04:00
|
|
|
|
|
|
|
# sudo -u pleroma MIX_ENV=prod elixir --erl \"-detached\" -S mix phx.server
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
2020-08-18 11:24:34 -04:00
|
|
|
name=pleroma
|
|
|
|
rcvar=pleroma_enable
|
|
|
|
|
2020-08-06 00:01:57 -04:00
|
|
|
desc="Pleroma Social Media Platform"
|
|
|
|
|
2020-08-18 11:24:34 -04:00
|
|
|
load_rc_config ${name}
|
2020-08-06 00:01:57 -04:00
|
|
|
|
2020-08-18 11:24:34 -04:00
|
|
|
: ${pleroma_user:=pleroma}
|
|
|
|
: ${pleroma_home:=$(getent passwd ${pleroma_user} | awk -F: '{print $6}')}
|
|
|
|
: ${pleroma_chdir:="${pleroma_home}/pleroma"}
|
|
|
|
: ${pleroma_env:="HOME=${pleroma_home} MIX_ENV=prod"}
|
|
|
|
|
|
|
|
command=/usr/local/bin/elixir
|
|
|
|
command_args="--erl \"-detached\" -S /usr/local/bin/mix phx.server"
|
|
|
|
procname="*beam.smp"
|
2020-08-06 00:01:57 -04:00
|
|
|
|
|
|
|
run_rc_command "$1"
|