View | Details | Raw Unified | Return to bug 249945
Collapse All | Expand All

(-)net/yggdrasil/Makefile (-3 / +4 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	yggdrasil
3
PORTNAME=	yggdrasil
4
DISTVERSIONPREFIX=	v
4
DISTVERSIONPREFIX=	v
5
DISTVERSION=	0.3.14
5
DISTVERSION=	0.3.15
6
CATEGORIES=	net
6
CATEGORIES=	net
7
7
8
MAINTAINER=	freebsd@neilalexander.dev
8
MAINTAINER=	freebsd@neilalexander.dev
Lines 26-32 Link Here
26
		golang:text:929e72ca90de:golang_text/vendor/golang.org/x/text \
26
		golang:text:929e72ca90de:golang_text/vendor/golang.org/x/text \
27
		gologme:log:4e5d8ccb38e8:gologme_log/vendor/github.com/gologme/log \
27
		gologme:log:4e5d8ccb38e8:gologme_log/vendor/github.com/gologme/log \
28
		hashicorp:go-syslog:v1.0.0:hashicorp_go_syslog/vendor/github.com/hashicorp/go-syslog \
28
		hashicorp:go-syslog:v1.0.0:hashicorp_go_syslog/vendor/github.com/hashicorp/go-syslog \
29
		hjson:hjson-go:9147687966d9:hjson_hjson_go/vendor/github.com/hjson/hjson-go \
29
		hjson:hjson-go:d5d0e8b0617d:hjson_hjson_go/vendor/github.com/hjson/hjson-go \
30
		kardianos:minwinsvc:cad6b2b879b0:kardianos_minwinsvc/vendor/github.com/kardianos/minwinsvc \
30
		kardianos:minwinsvc:cad6b2b879b0:kardianos_minwinsvc/vendor/github.com/kardianos/minwinsvc \
31
		mattn:go-colorable:v0.1.2:mattn_go_colorable/vendor/github.com/mattn/go-colorable \
31
		mattn:go-colorable:v0.1.2:mattn_go_colorable/vendor/github.com/mattn/go-colorable \
32
		mattn:go-isatty:v0.0.10:mattn_go_isatty/vendor/github.com/mattn/go-isatty \
32
		mattn:go-isatty:v0.0.10:mattn_go_isatty/vendor/github.com/mattn/go-isatty \
Lines 34-40 Link Here
34
		mitchellh:mapstructure:v1.1.2:mitchellh_mapstructure/vendor/github.com/mitchellh/mapstructure \
34
		mitchellh:mapstructure:v1.1.2:mitchellh_mapstructure/vendor/github.com/mitchellh/mapstructure \
35
		vishvananda:netlink:v1.0.0:vishvananda_netlink/vendor/github.com/vishvananda/netlink \
35
		vishvananda:netlink:v1.0.0:vishvananda_netlink/vendor/github.com/vishvananda/netlink \
36
		vishvananda:netns:7109fa855b0f:vishvananda_netns/vendor/github.com/vishvananda/netns \
36
		vishvananda:netns:7109fa855b0f:vishvananda_netns/vendor/github.com/vishvananda/netns \
37
		wireguard:wireguard-go:v0.0.20200320:wireguard_wireguard_go/vendor/golang.zx2c4.com/wireguard
37
		wireguard:wireguard-go:v0.0.20200320:wireguard_wireguard_go/vendor/golang.zx2c4.com/wireguard \
38
		WireGuard:wireguard-windows:v0.1.0:wireguard_wireguard_windows/vendor/golang.zx2c4.com/wireguard/windows
38
39
39
GO_TARGET=	./cmd/yggdrasil \
40
GO_TARGET=	./cmd/yggdrasil \
40
		./cmd/yggdrasilctl
41
		./cmd/yggdrasilctl
(-)net/yggdrasil/distinfo (-5 / +7 lines)
Lines 1-6 Link Here
1
TIMESTAMP = 1591539050
1
TIMESTAMP = 1601220969
2
SHA256 (yggdrasil-network-yggdrasil-go-v0.3.14_GH0.tar.gz) = e8579a04bf289434e7b8caaf621e2c0b853e83cc06f136c4f9e4bfc667df5a27
2
SHA256 (yggdrasil-network-yggdrasil-go-v0.3.15_GH0.tar.gz) = 25ea85399a142aa7a3d6f6886fd4e0d215116c4c8c33453de43999787d735565
3
SIZE (yggdrasil-network-yggdrasil-go-v0.3.14_GH0.tar.gz) = 165211
3
SIZE (yggdrasil-network-yggdrasil-go-v0.3.15_GH0.tar.gz) = 166072
4
SHA256 (Arceliar-phony-d0c68492aca0_GH0.tar.gz) = 10a586be941ff65576fd97548cdea7087a5d6d85c99c1b69bc77301d41179e67
4
SHA256 (Arceliar-phony-d0c68492aca0_GH0.tar.gz) = 10a586be941ff65576fd97548cdea7087a5d6d85c99c1b69bc77301d41179e67
5
SIZE (Arceliar-phony-d0c68492aca0_GH0.tar.gz) = 6835
5
SIZE (Arceliar-phony-d0c68492aca0_GH0.tar.gz) = 6835
6
SHA256 (VividCortex-ewma-v1.1.1_GH0.tar.gz) = 3b2d62412b7ba2726a379cc0ae557595c027dc8206d0ef98f13831281b8f2b85
6
SHA256 (VividCortex-ewma-v1.1.1_GH0.tar.gz) = 3b2d62412b7ba2726a379cc0ae557595c027dc8206d0ef98f13831281b8f2b85
Lines 21-28 Link Here
21
SIZE (gologme-log-4e5d8ccb38e8_GH0.tar.gz) = 5613
21
SIZE (gologme-log-4e5d8ccb38e8_GH0.tar.gz) = 5613
22
SHA256 (hashicorp-go-syslog-v1.0.0_GH0.tar.gz) = be4bda814c068311ea8e185e2d108077f167897cfa868ada7f56d97a10f3d602
22
SHA256 (hashicorp-go-syslog-v1.0.0_GH0.tar.gz) = be4bda814c068311ea8e185e2d108077f167897cfa868ada7f56d97a10f3d602
23
SIZE (hashicorp-go-syslog-v1.0.0_GH0.tar.gz) = 4517
23
SIZE (hashicorp-go-syslog-v1.0.0_GH0.tar.gz) = 4517
24
SHA256 (hjson-hjson-go-9147687966d9_GH0.tar.gz) = 784f53c32a62cad8ec6c03243b7531d8f16a4ce9ddec61b4615442709a955d84
24
SHA256 (hjson-hjson-go-d5d0e8b0617d_GH0.tar.gz) = 78f0e0b7c73705e32540bd1d1d954965585144d95867603b7a0475d13ae3298d
25
SIZE (hjson-hjson-go-9147687966d9_GH0.tar.gz) = 25559
25
SIZE (hjson-hjson-go-d5d0e8b0617d_GH0.tar.gz) = 25621
26
SHA256 (kardianos-minwinsvc-cad6b2b879b0_GH0.tar.gz) = 820c068dfee3306853cb6cc63becb96b9f972a14a97ad71df3332f98bc4866cb
26
SHA256 (kardianos-minwinsvc-cad6b2b879b0_GH0.tar.gz) = 820c068dfee3306853cb6cc63becb96b9f972a14a97ad71df3332f98bc4866cb
27
SIZE (kardianos-minwinsvc-cad6b2b879b0_GH0.tar.gz) = 1804
27
SIZE (kardianos-minwinsvc-cad6b2b879b0_GH0.tar.gz) = 1804
28
SHA256 (mattn-go-colorable-v0.1.2_GH0.tar.gz) = a7189bd9005c571303b117261955ce53b0e2aa89fe415e2289659be343fe1651
28
SHA256 (mattn-go-colorable-v0.1.2_GH0.tar.gz) = a7189bd9005c571303b117261955ce53b0e2aa89fe415e2289659be343fe1651
Lines 39-41 Link Here
39
SIZE (vishvananda-netns-7109fa855b0f_GH0.tar.gz) = 7868
39
SIZE (vishvananda-netns-7109fa855b0f_GH0.tar.gz) = 7868
40
SHA256 (wireguard-wireguard-go-v0.0.20200320_GH0.tar.gz) = a40f5ca7c33b0d631c2777b992d7a398491bc4d72ed1e559a86055637a708844
40
SHA256 (wireguard-wireguard-go-v0.0.20200320_GH0.tar.gz) = a40f5ca7c33b0d631c2777b992d7a398491bc4d72ed1e559a86055637a708844
41
SIZE (wireguard-wireguard-go-v0.0.20200320_GH0.tar.gz) = 96760
41
SIZE (wireguard-wireguard-go-v0.0.20200320_GH0.tar.gz) = 96760
42
SHA256 (WireGuard-wireguard-windows-v0.1.0_GH0.tar.gz) = 92b9f99d06843ef49aef4b5798dc4531220c79b3c11d02d1f7ad4ffb2071e1aa
43
SIZE (WireGuard-wireguard-windows-v0.1.0_GH0.tar.gz) = 191555
(-)net/yggdrasil/files/yggdrasil.in (-40 / +3 lines)
Lines 10-24 Link Here
10
rcvar="yggdrasil_enable"
10
rcvar="yggdrasil_enable"
11
11
12
start_cmd="${name}_start"
12
start_cmd="${name}_start"
13
start_precmd="${name}_prestart"
14
stop_cmd="${name}_stop"
15
stop_postcmd="${name}_poststop"
16
13
17
pidfile="/var/run/yggdrasil/${name}.pid"
14
pidfile="/var/run/yggdrasil/${name}.pid"
18
command="/usr/sbin/daemon"
15
command="/usr/sbin/daemon"
19
command_args="-P ${pidfile} -r -f ${yggdrasil_command}"
16
command_args="-P ${pidfile} -r"
20
17
21
yggdrasil_prestart()
18
yggdrasil_start()
22
{
19
{
23
	test ! -x %%PREFIX%%/bin/yggdrasil && (
20
	test ! -x %%PREFIX%%/bin/yggdrasil && (
24
		logger -s -t yggdrasil "Warning: %%PREFIX%%/bin/yggdrasil is missing or not executable"
21
		logger -s -t yggdrasil "Warning: %%PREFIX%%/bin/yggdrasil is missing or not executable"
Lines 31-77 Link Here
31
		%%PREFIX%%/bin/yggdrasil -genconf > %%PREFIX%%/etc/yggdrasil.conf
28
		%%PREFIX%%/bin/yggdrasil -genconf > %%PREFIX%%/etc/yggdrasil.conf
32
	)
29
	)
33
30
34
	tap_path="$(cat %%PREFIX%%/etc/yggdrasil.conf | egrep -o '/dev/tap[0-9]{1,2}$')"
35
	tap_name="$(echo -n ${tap_path} | tr -d '/dev/')"
36
37
	/sbin/ifconfig ${tap_name} >/dev/null 2>&1 || (
38
		logger -s -t yggdrasil "Creating ${tap_name} adapter"
39
		/sbin/ifconfig ${tap_name} create || logger -s -t yggdrasil "Failed to create ${tap_name} adapter"
40
	)
41
42
	mkdir -p /var/run/yggdrasil
31
	mkdir -p /var/run/yggdrasil
43
}
44
32
45
yggdrasil_start()
46
{
47
	/sbin/ifconfig ${tap_name} >/dev/null 2>&1 || (
48
		logger -s -t yggdrasil "Creating ${tap_name} adapter"
49
		/sbin/ifconfig ${tap_name} create || logger -s -t yggdrasil "Failed to create ${tap_name} adapter"
50
	)
51
52
	logger -s -t yggdrasil "Starting yggdrasil"
33
	logger -s -t yggdrasil "Starting yggdrasil"
53
	${command} ${command_args} %%PREFIX%%/bin/yggdrasil -useconffile %%PREFIX%%/etc/yggdrasil.conf \
34
	${command} ${command_args} %%PREFIX%%/bin/yggdrasil -useconffile %%PREFIX%%/etc/yggdrasil.conf \
54
		1>/var/log/yggdrasil.stdout.log \
35
		-logto /var/log/yggdrasil.log
55
		2>/var/log/yggdrasil.stderr.log &
56
}
36
}
57
37
58
yggdrasil_stop()
59
{
60
	logger -s -t yggdrasil "Stopping yggdrasil"
61
	test -f /var/run/yggdrasil/${name}.pid && kill -TERM $(cat /var/run/yggdrasil/${name}.pid)
62
}
63
64
yggdrasil_poststop()
65
{
66
	tap_path="$(cat %%PREFIX%%/etc/yggdrasil.conf | grep /dev/tap | egrep -o '/dev/.*$')"
67
        tap_name="$(echo -n ${tap_path} | tr -d '/dev/')"
68
69
	/sbin/ifconfig ${tap_name} >/dev/null 2>&1 && (
70
		logger -s -t yggdrasil "Destroying ${tap_name} adapter"
71
		/sbin/ifconfig ${tap_name} destroy || logger -s -t yggdrasil "Failed to destroy ${tap_name} adapter"
72
	)
73
}
74
75
load_rc_config $name
38
load_rc_config $name
76
: ${yggdrasil_enable:=no}
39
: ${yggdrasil_enable:=no}
77
40

Return to bug 249945