aboutsummaryrefslogtreecommitdiffstats
path: root/testing/heplify-server/heplify-server.initd
blob: a7ac51e2019d5a12b052a026f6436c46bac4a4a4 (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
26
#!/sbin/openrc-run

description="HEP Capture Server & Switch"
supervisor=supervise-daemon
command=/usr/bin/heplify-server
command_args="-config /etc/homer/heplify-server.toml"
command_user=homer
command_group=homer
pidfile="/run/homer/${RC_SVCNAME}.pid"
extra_started_commands=reload

depend() {
	need net
	after firewall postgresql
}

start_pre() {
	checkpath --directory --owner $command_user:$command_group ${pidfile%/*}
}

reload() {
	ebegin "Reloading PromTargetIP and PromTargetName in ${RC_SVCNAME} configuration"
	${supervisor} ${RC_SVCNAME} --signal HUP
	eend $?
}