mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 20:46:39 +02:00
30 lines
585 B
Bash
30 lines
585 B
Bash
#!/sbin/openrc-run
|
|
|
|
name=strfry
|
|
description="Strfry Nostr relay"
|
|
|
|
: ${STRFRY_CONFIG:="/etc/strfry.conf"}
|
|
export STRFRY_CONFIG
|
|
|
|
command="/usr/sbin/strfry"
|
|
command_args="relay"
|
|
command_background="yes"
|
|
command_user="strfry:strfry"
|
|
pidfile="/run/${RC_SVCNAME}.pid"
|
|
output_log="/var/log/strfry.log"
|
|
error_log="/var/log/strfry.log"
|
|
|
|
required_files="$STRFRY_CONFIG"
|
|
|
|
depend() {
|
|
need localmount net
|
|
after firewall
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath -q -f -m 0640 -o "$command_user" \
|
|
"$STRFRY_CONFIG" "$output_log" "$error_log"
|
|
|
|
checkpath -q -d -m 0750 -o "$command_user" \
|
|
/var/lib/strfry
|
|
}
|