aports/testing/mitra/mitra.initd
Celeste 61424fe913 testing/mitra: new aport
https://codeberg.org/silverpill/mitra
ActivityPub microblogging platform written in Rust
2023-07-22 23:30:15 +00:00

27 lines
611 B
Bash

#!/sbin/openrc-run
name=mitra
description="Mitra is an ActivityPub microblogging platform written in Rust"
: ${cfgfile:="/etc/mitra/config.yaml"}
export CONFIG_PATH="${cfgfile}"
command="/usr/bin/mitra"
command_background=true
command_user="mitra:mitra"
pidfile="/run/${RC_SVCNAME}.pid"
directory="/var/lib/mitra"
error_log="/var/log/mitra.log"
required_files="$cfgfile"
depend() {
need localmount net postgresql
after firewall
}
start_pre() {
checkpath -f -m 0640 -o "root:mitra" "$cfgfile"
checkpath -f -m 0640 -o "$command_user" "$error_log"
checkpath -d -m 0750 -o "$command_user" "$directory"
}