#!/sbin/openrc-run

name=ntfy
command="/usr/bin/ntfy"
command_background=true
pidfile="/run/${RC_SVCNAME}.pid"
error_log="/var/log/ntfy.log"
command_user="ntfy:ntfy"

depend() {
        need net
        after firewall
}

start_pre() {
	checkpath -f --owner "$command_user" --mode 0644 \
		/var/log/ntfy.log
	checkpath -d --owner "$command_user" --mode 0755 \
		/var/lib/ntfy/
}
