mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-26 16:02:18 +00:00
cc45c69fff
While taking a final look at instance.gen before releasing I noticed that the release_env task outputs messages in broken english. Upon further inspection it seems to have even more severe issues which, in my opinion, warrant it's at least temporary removal: - We do not explain what it actually does, anywhere. Neither the task docs nor instance.gen, nor installation instructions. - It does not respect FHS on OTP releases (uses /opt/pleroma/config even though we store the config in /etc/pleroma/config.exs). - It doesn't work on OTP releases, which is the main reason it exists. Neither systemd nor openrc service files for OTP include it. - It is not mentioned in install guides other than the ones for Debian and OTP releases.
46 lines
1.2 KiB
Plaintext
Executable file
46 lines
1.2 KiB
Plaintext
Executable file
#!/sbin/openrc-run
|
|
supervisor=supervise-daemon
|
|
command_user=pleroma:pleroma
|
|
command_background=1
|
|
# Ask process to terminate within 30 seconds, otherwise kill it
|
|
retry="SIGTERM/30/SIGKILL/5"
|
|
pidfile="/var/run/pleroma.pid"
|
|
directory=/opt/pleroma
|
|
healthcheck_delay=60
|
|
healthcheck_timer=30
|
|
|
|
: ${pleroma_port:-4000}
|
|
|
|
# Needs OpenRC >= 0.42
|
|
#respawn_max=0
|
|
#respawn_delay=5
|
|
|
|
# put pleroma_console=YES in /etc/conf.d/pleroma if you want to be able to
|
|
# connect to pleroma via an elixir console
|
|
if yesno "${pleroma_console}"; then
|
|
command=elixir
|
|
command_args="--name pleroma@127.0.0.1 --erl '-kernel inet_dist_listen_min 9001 inet_dist_listen_max 9001 inet_dist_use_interface {127,0,0,1}' -S mix phx.server"
|
|
|
|
start_post() {
|
|
einfo "You can get a console by using this command as pleroma's user:"
|
|
einfo "iex --name console@127.0.0.1 --remsh pleroma@127.0.0.1"
|
|
}
|
|
else
|
|
command=/usr/bin/mix
|
|
command_args="phx.server"
|
|
fi
|
|
|
|
export MIX_ENV=prod
|
|
|
|
depend() {
|
|
need nginx postgresql
|
|
}
|
|
|
|
healthcheck() {
|
|
# put pleroma_health=YES in /etc/conf.d/pleroma if you want healthchecking
|
|
# and make sure you have curl installed
|
|
yesno "$pleroma_health" || return 0
|
|
|
|
curl -q "localhost:${pleroma_port}/api/pleroma/healthcheck"
|
|
}
|