1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-19 01:05:15 +03:00
aports/testing/mitra/mitra.initd
2025-04-27 04:29:51 +00:00

28 lines
633 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_args="server"
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"
}