summaryrefslogtreecommitdiff
path: root/net/irrd/files/irrd4.in
blob: 5ac3954e2f7b87c564b63a25f6b8d4b94e6fe26c (plain) (blame)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
# $FreeBSD$

# PROVIDE: irrd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown

# Define these irrd_* variables in one of these files:
#	/etc/rc.conf
#	/etc/rc.conf.local
#	/etc/rc.conf.d/irrd
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
# irrd4_enable (bool):	Set to NO by default.
#			Set it to YES to enable irrd4
# irrd4_uid (string):	Set to irrd by default.
# irrd4_gid (string):	Set to irrd by default.
# irrd4_logfile (path):	Set to /var/log/irrd4.log by default.
# irrd4_pidfile (path):	Set to /var/run/irrd4.pid by default.
# irrd4_config (path):	Set to %%PREFIX%%/etc/irrd4.yaml by default.

. /etc/rc.subr

name="irrd4"
rcvar=irrd4_enable
command="%%PREFIX%%/bin/twistd"

load_rc_config $name

irrd4_enable=${irrd4_enable-"NO"}
irrd4_uid=${irrd4_uid-"%%USERS%%"}
irrd4_gid=${irrd4_gid-"%%GROUPS%%"}
irrd4_logfile=${irrd4_logfile-"/var/log/irrd4.log"}
irrd4_pidfile=${irrd4_pidfile-"/var/run/irrd4.pid"}
irrd4_config=${irrd4_config-"%%PREFIX%%/etc/irrd4.yaml"}

required_files="${irrd4_config}"
command_interpreter="%%PYTHON_CMD%%"
pidfile=${irrd4_pidfile}

command_args="--originalname -u ${irrd4_uid} -g ${irrd4_gid} --pidfile ${pidfile} -l ${irrd4_logfile} irrd -c ${irrd4_config}"

run_rc_command "$1"