openbsd rc: replace deprecated flags, renamed to fit other service files
This commit is contained in:
parent
6099a94dbc
commit
b2a716fc91
1 changed files with 7 additions and 5 deletions
36
installation/openbsd/rc.d/pleroma
Executable file
36
installation/openbsd/rc.d/pleroma
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/ksh
|
||||
#
|
||||
# Default init file for Pleroma on OpenBSD
|
||||
#
|
||||
# Simple installation instructions:
|
||||
# 1. Install Pleroma per wiki instructions
|
||||
# 2. Place this pleroma file in /etc/rc.d
|
||||
# 3. Enable and start Pleroma
|
||||
# # doas rcctl enable pleroma
|
||||
# # doas rcctl start pleroma
|
||||
#
|
||||
|
||||
daemon="/usr/local/bin/elixir"
|
||||
daemon_flags="--erl \"-detached\" -S /usr/local/bin/mix phx.server"
|
||||
daemon_user="_pleroma"
|
||||
|
||||
env="MIX_ENV=prod"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_reload=NO
|
||||
pexp="phx.server"
|
||||
|
||||
rc_check() {
|
||||
pgrep -q -U _pleroma -f "phx.server"
|
||||
}
|
||||
|
||||
rc_start() {
|
||||
rc_exec "cd pleroma; export ${env}; ${daemon} ${daemon_flags}"
|
||||
}
|
||||
|
||||
rc_stop() {
|
||||
pkill -q -U _pleroma -f "phx.server"
|
||||
}
|
||||
|
||||
rc_cmd $1
|
||||
Loading…
Add table
Add a link
Reference in a new issue