summaryrefslogtreecommitdiff
path: root/www-apps/goatcounter/files/goatcounter.initd-r1
blob: 441675a88e4b89c7216bc4523c403c8f2c274f22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/sbin/openrc-run
# shellcheck shell=sh
#
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

supervisor="supervise-daemon"
description="GoatCounter web analytics daemon service"
command="/usr/bin/goatcounter"
command_args="serve"
command_user="goatcounter:goatcounter"
pidfile="/run/goatcounter.pid"
capabilities="^cap_net_bind_service"

output_log="/var/log/goatcounter.log"
error_log="${output_log}"

depend() {
	need net
	use dns firewall postgresql
}

start_pre() {
	checkpath -fo "${command_user}" "${output_log}"
}