summaryrefslogtreecommitdiffstats
path: root/snapcraft/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'snapcraft/scripts')
-rw-r--r--snapcraft/scripts/Makefile1
-rw-r--r--snapcraft/scripts/bfdd-service14
2 files changed, 15 insertions, 0 deletions
diff --git a/snapcraft/scripts/Makefile b/snapcraft/scripts/Makefile
index 9a476c6e5..e3a7708f2 100644
--- a/snapcraft/scripts/Makefile
+++ b/snapcraft/scripts/Makefile
@@ -16,6 +16,7 @@ install:
install -D -m 0755 eigrpd-service $(DESTDIR)/bin/
install -D -m 0755 pbrd-service $(DESTDIR)/bin/
install -D -m 0755 staticd-service $(DESTDIR)/bin/
+ install -D -m 0755 bfdd-service $(DESTDIR)/bin/
install -D -m 0755 set-options $(DESTDIR)/bin/
install -D -m 0755 show_version $(DESTDIR)/bin/
diff --git a/snapcraft/scripts/bfdd-service b/snapcraft/scripts/bfdd-service
new file mode 100644
index 000000000..f94a7abb4
--- /dev/null
+++ b/snapcraft/scripts/bfdd-service
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/bfdd.conf ]; then
+ cp $SNAP/etc/frr/bfdd.conf.default $SNAP_DATA/bfdd.conf
+fi
+exec $SNAP/sbin/bfdd \
+ -f $SNAP_DATA/bfdd.conf \
+ --pid_file $SNAP_DATA/bfdd.pid \
+ --socket $SNAP_DATA/zsock \
+ --vty_socket $SNAP_DATA \
+ --bfdctl $SNAP_DATA/bfdd.sock
+