summaryrefslogtreecommitdiffstats
path: root/snapcraft/scripts
diff options
context:
space:
mode:
authorMartin Winter <mwinter@opensourcerouting.org>2021-08-17 21:24:47 +0200
committerMartin Winter <mwinter@opensourcerouting.org>2021-08-17 21:43:27 +0200
commit4baa3aebdc0cf40c22c9eb7274c632bd871fa138 (patch)
tree57f5a31a21a4e8b234ebfd27d8269560d6fa423e /snapcraft/scripts
parentsnapcraft: Change base to Ubuntu 18.04 and libyang 2.0.7 (diff)
downloadfrr-4baa3aebdc0cf40c22c9eb7274c632bd871fa138.tar.xz
frr-4baa3aebdc0cf40c22c9eb7274c632bd871fa138.zip
snapcraft: Add pathd to FRR snap daemons
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Diffstat (limited to 'snapcraft/scripts')
-rw-r--r--snapcraft/scripts/Makefile1
-rw-r--r--snapcraft/scripts/pathd-service13
2 files changed, 14 insertions, 0 deletions
diff --git a/snapcraft/scripts/Makefile b/snapcraft/scripts/Makefile
index 0435b3bc5..5aedddcf6 100644
--- a/snapcraft/scripts/Makefile
+++ b/snapcraft/scripts/Makefile
@@ -19,6 +19,7 @@ install:
install -D -m 0755 bfdd-service $(DESTDIR)/bin/
install -D -m 0755 fabricd-service $(DESTDIR)/bin/
install -D -m 0755 vrrpd-service $(DESTDIR)/bin/
+ install -D -m 0755 pathd-service $(DESTDIR)/bin/
install -D -m 0755 set-options $(DESTDIR)/bin/
install -D -m 0755 show_version $(DESTDIR)/bin/
diff --git a/snapcraft/scripts/pathd-service b/snapcraft/scripts/pathd-service
new file mode 100644
index 000000000..6473c59d9
--- /dev/null
+++ b/snapcraft/scripts/pathd-service
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/pathd.conf ]; then
+ cp $SNAP/etc/frr/pathd.conf.default $SNAP_DATA/pathd.conf
+fi
+exec $SNAP/sbin/pathd \
+ -f $SNAP_DATA/pathd.conf \
+ --pid_file $SNAP_DATA/pathd.pid \
+ --socket $SNAP_DATA/zsock \
+ --vty_socket $SNAP_DATA
+