aboutsummaryrefslogtreecommitdiff
path: root/rp/rpki-rtr/rules.freebsd.mk
blob: 0f1546b2a674d15993218d96026f47058f3739d2 (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
# $Id$

install-always:

install-postconf: install-listener

install-listener: .FORCE
	@if /usr/bin/egrep -q '^rpki-rtr' /etc/services ; \
	then \
	    echo "You already have a /etc/services entry for rpki-rtr, so I will use it."; \
	elif echo >>/etc/services "rpki-rtr	${RPKI_RTR_PORT}/tcp  #RFC 6810" ; \
	then \
	    echo "Added rpki-rtr to /etc/services."; \
	else \
	    echo "Adding rpki-rtr to /etc/services failed, please fix this, then try again."; \
	    exit 1; \
	fi
	@if /usr/bin/egrep -q "rpki-rtr[ 	]+stream[ 	]+tcp[ 	]" /etc/inetd.conf; \
	then \
	    echo "You already have an inetd.conf entry for rpki-rtr on TCPv4, so I will use it."; \
	elif echo >>/etc/inetd.conf "rpki-rtr	stream	tcp	nowait	rpki	/usr/local/bin/rpki-rtr	rpki-rtr server /var/rcynic/rpki-rtr"; \
	then \
	    echo "Added rpki-rtr for TCPv4 to /etc/inetd.conf."; \
	else \
	    echo "Adding rpki-rtr for TCPv4 to /etc/inetd.conf failed, please fix this, then try again."; \
	    exit 1; \
	fi
	@if /usr/bin/egrep -q "rpki-rtr[ 	]+stream[ 	]+tcp6[ 	]" /etc/inetd.conf; \
	then \
	    echo "You already have an inetd.conf entry for rpki-rtr on TCPv6, so I will use it."; \
	elif echo >>/etc/inetd.conf "rpki-rtr	stream	tcp6	nowait	rpki	/usr/local/bin/rpki-rtr	rpki-rtr server /var/rcynic/rpki-rtr"; \
	then \
	    echo "Added rpki-rtr for TCPv6 to /etc/inetd.conf."; \
	else \
	    echo "Adding rpki-rtr for TCPv6 to /etc/inetd.conf failed, please fix this, then try again."; \
	    exit 1; \
	fi