uppdate excoveralls
[akkoma] / installation / freebsd / rc.d / akkoma
1 #!/bin/sh
2 # $FreeBSD$
3 # PROVIDE: akkoma
4 # REQUIRE: DAEMON postgresql
5 # KEYWORD: shutdown
6
7 # sudo -u akkoma MIX_ENV=prod elixir --erl \"-detached\" -S mix phx.server
8
9 . /etc/rc.subr
10
11 name=akkoma
12 rcvar=akkoma_enable
13
14 desc="Akkoma Social Media Platform"
15
16 load_rc_config ${name}
17
18 : ${akkoma_user:=akkoma}
19 : ${akkoma_home:=$(getent passwd ${akkoma_user} | awk -F: '{print $6}')}
20 : ${akkoma_chdir:="${akkoma_home}/akkoma"}
21 : ${akkoma_env:="HOME=${akkoma_home} MIX_ENV=prod ERL_EPMD_ADDRESS=127.0.0.1"}
22
23
24 command=/usr/local/bin/elixir
25 command_args="--erl \"-detached\" -S /usr/local/bin/mix phx.server"
26 procname="*beam.smp"
27
28 run_rc_command "$1"