X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=installation%2Fopenbsd%2Frc.d%2Fakkomad;fp=installation%2Fopenbsd%2Frc.d%2Fakkomad;h=68be46c9aa2010cc799893b19f2a749e908e8ff7;hb=c0e6f30e4d17bd69b7ddd26aa0c0f1433184128a;hp=0000000000000000000000000000000000000000;hpb=3d9dabd9147d2ba001d64de0ea5527bc5727dda6;p=akkoma diff --git a/installation/openbsd/rc.d/akkomad b/installation/openbsd/rc.d/akkomad new file mode 100755 index 000000000..68be46c9a --- /dev/null +++ b/installation/openbsd/rc.d/akkomad @@ -0,0 +1,34 @@ +#!/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