Skip to content

Instantly share code, notes, and snippets.

@lantrix
Created January 31, 2021 13:46
Show Gist options
  • Save lantrix/4d54ceffae0aaf06e3f634404df92867 to your computer and use it in GitHub Desktop.
Save lantrix/4d54ceffae0aaf06e3f634404df92867 to your computer and use it in GitHub Desktop.
Matrix server dendrite rc.d script for OpenBSD
#!/bin/ksh
daemon="/usr/local/bin/dendrite-monolith-server"
rc_reload=NO
rc_bg=YES
. /etc/rc.d/rc.subr
pexp="/usr/local/bin/dendrite"
rc_start() {
${rcexec} "${daemon} ${daemon_flags} &"
}
rc_stop() {
pkill -f "${pexp}"
}
rc_check() {
pgrep -T "${daemon_rtable}" -q -f "${pexp}"
}
rc_reload() {
echo "Not implemented"
}
rc_cmd $1
dendrite_flags=-config /home/dendrite/dendrite.yaml
dendrite_user="dendrite"
pkg_scripts=nginx dendrite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment