mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-19 01:05:15 +03:00
28 lines
633 B
Bash
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"
|
|
}
|