mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 18:26:39 +02:00
27 lines
611 B
Bash
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"
|
|
}
|