mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-29 03:53:55 +00:00
c0e6f30e4d
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/48 Co-authored-by: norm <normandy@biribiri.dev> Co-committed-by: norm <normandy@biribiri.dev>
35 lines
615 B
Bash
Executable file
35 lines
615 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="--detached -S /usr/local/bin/mix phx.server"
|
|
daemon_user="_akkoma"
|
|
|
|
. /etc/rc.d/rc.subr
|
|
|
|
rc_reload=NO
|
|
pexp="phx.server"
|
|
|
|
rc_check() {
|
|
pgrep -q -U _akkoma -f "phx.server"
|
|
}
|
|
|
|
rc_start() {
|
|
${rcexec} "cd akkoma; ${daemon} ${daemon_flags}"
|
|
}
|
|
|
|
rc_stop() {
|
|
pkill -q -U _akkoma -f "phx.server"
|
|
}
|
|
|
|
rc_cmd $1
|