mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 18:26:39 +02:00
26 lines
544 B
Bash
26 lines
544 B
Bash
#!/sbin/openrc-run
|
|
|
|
name=lemmy
|
|
description="Lemmy Backend"
|
|
|
|
: ${cfgfile:="/etc/lemmy/lemmy.hjson"}
|
|
export LEMMY_CONFIG_LOCATION="${cfgfile}"
|
|
|
|
command="/usr/bin/lemmy_server"
|
|
command_background=true
|
|
command_user="lemmy:lemmy"
|
|
pidfile="/run/${RC_SVCNAME}.pid"
|
|
output_log="/var/log/lemmy.log"
|
|
error_log="/var/log/lemmy.err"
|
|
|
|
required_files="$cfgfile"
|
|
|
|
depend() {
|
|
need localmount net
|
|
after firewall postgresql
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath -f -m 0640 -o "root:lemmy" "$cfgfile"
|
|
checkpath -f -m 0640 -o "$command_user" "$output_log" "$error_log"
|
|
}
|