mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2025-01-10 17:40:15 +00:00
d8c7ed70d0
Changes suggested and tested by eviloatmeal Fixes: https://akkoma.dev/AkkomaGang/akkoma/issues/864
37 lines
641 B
Bash
Executable file
37 lines
641 B
Bash
Executable file
#!/bin/ksh
|
|
#
|
|
# Default init file for Akkoma on OpenBSD
|
|
#
|
|
# Simple installation instructions:
|
|
# 1. Install Akkoma per wiki instructions
|
|
# 2. Place this akkomad file in /etc/rc.d
|
|
# 3. Enable and start Akkoma
|
|
# # doas rcctl enable akkomad
|
|
# # doas rcctl start akkomad
|
|
#
|
|
|
|
daemon="/usr/local/bin/elixir"
|
|
daemon_flags="-S /usr/local/bin/mix phx.server"
|
|
daemon_user="_akkoma"
|
|
daemon_execdir="/home/_akkoma/akkoma"
|
|
|
|
. /etc/rc.d/rc.subr
|
|
|
|
rc_bg="YES"
|
|
rc_reload=NO
|
|
pexp="phx.server"
|
|
|
|
rc_check() {
|
|
pgrep -q -U _akkoma -f "phx.server"
|
|
}
|
|
|
|
rc_start() {
|
|
rc_exec "${daemon} ${daemon_flags}"
|
|
}
|
|
|
|
rc_stop() {
|
|
pkill -q -U _akkoma -f "phx.server"
|
|
}
|
|
|
|
rc_cmd $1
|