From 526797b41c8dfffc7e74a951c17ef96734980e7a Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Sun, 2 Feb 2025 15:21:26 +0100 Subject: Add role for Dn42 and network namespace --- roles/linux-ns/files/systemd/dn42_bird.service | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 roles/linux-ns/files/systemd/dn42_bird.service (limited to 'roles/linux-ns/files/systemd/dn42_bird.service') diff --git a/roles/linux-ns/files/systemd/dn42_bird.service b/roles/linux-ns/files/systemd/dn42_bird.service new file mode 100644 index 0000000..a4e74fd --- /dev/null +++ b/roles/linux-ns/files/systemd/dn42_bird.service @@ -0,0 +1,27 @@ +# bird service for dn42 + +[Unit] +Description=BIRD Internet Routing Daemon - DN42 daemon +After=network.target +Wants=dn42_tinc@tn_int.service +After=dn42_tinc@tn_int.service + +[Service] +EnvironmentFile=/etc/bird/envvars +ExecStartPre=/bin/sleep 3 +ExecStartPre=/usr/lib/bird/prepare-environment +ExecStartPre=/usr/sbin/bird -c /etc/bird/dn42/bird.conf -p +ExecStart=/usr/sbin/bird -c /etc/bird/dn42/bird.conf -f -g bird -u bird -s /var/run/bird/bird_dn42.sock +ExecReload=/usr/sbin/birdc -s /var/run/bird/bird_dn42.sock configure +Restart=on-abort + +NetworkNamespacePath=/run/netns/dn42 +BindReadOnlyPaths=/etc/netns/dn42/resolv.conf:/etc/resolv.conf +ProtectSystem=strict +# rel: /var/log +# nope, doesn't work, bird must start with root +#LogsDirectory= +ReadWritePaths=/run/bird/ /var/log/bird/dn42/ + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3