Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

46 рядки
1.2KB

  1. #!/sbin/openrc-run
  2. supervisor=supervise-daemon
  3. command_user=pleroma:pleroma
  4. command_background=1
  5. # Ask process to terminate within 30 seconds, otherwise kill it
  6. retry="SIGTERM/30/SIGKILL/5"
  7. pidfile="/var/run/pleroma.pid"
  8. directory=/opt/pleroma
  9. healthcheck_delay=60
  10. healthcheck_timer=30
  11. : ${pleroma_port:-4000}
  12. # Needs OpenRC >= 0.42
  13. #respawn_max=0
  14. #respawn_delay=5
  15. # put pleroma_console=YES in /etc/conf.d/pleroma if you want to be able to
  16. # connect to pleroma via an elixir console
  17. if yesno "${pleroma_console}"; then
  18. command=elixir
  19. 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"
  20. start_post() {
  21. einfo "You can get a console by using this command as pleroma's user:"
  22. einfo "iex --name console@127.0.0.1 --remsh pleroma@127.0.0.1"
  23. }
  24. else
  25. command=/usr/bin/mix
  26. command_args="phx.server"
  27. fi
  28. export MIX_ENV=prod
  29. depend() {
  30. need nginx postgresql
  31. }
  32. healthcheck() {
  33. # put pleroma_health=YES in /etc/conf.d/pleroma if you want healthchecking
  34. # and make sure you have curl installed
  35. yesno "$pleroma_health" || return 0
  36. curl -q "localhost:${pleroma_port}/api/pleroma/healthcheck"
  37. }