diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 13:16:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 13:16:35 +0000 |
commit | e2bbf175a2184bd76f6c54ccf8456babeb1a46fc (patch) | |
tree | f0b76550d6e6f500ada964a3a4ee933a45e5a6f1 /snapcraft/scripts/bgpd-service | |
parent | Initial commit. (diff) | |
download | frr-e2bbf175a2184bd76f6c54ccf8456babeb1a46fc.tar.xz frr-e2bbf175a2184bd76f6c54ccf8456babeb1a46fc.zip |
Adding upstream version 9.1.upstream/9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'snapcraft/scripts/bgpd-service')
-rw-r--r-- | snapcraft/scripts/bgpd-service | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/snapcraft/scripts/bgpd-service b/snapcraft/scripts/bgpd-service new file mode 100644 index 0000000..64273d9 --- /dev/null +++ b/snapcraft/scripts/bgpd-service @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e -x + +if ! [ -e $SNAP_DATA/bgpd.conf ]; then + cp $SNAP/etc/frr/bgpd.conf.default $SNAP_DATA/bgpd.conf +fi +# If no RPKI option is specified, then we create a default +# with RPKI enabled +if ! [ -e $SNAP_DATA/rpki.conf ]; then + echo "-M rpki" > $SNAP_DATA/rpki.conf +fi +EXTRA_OPTIONS="`$SNAP/bin/cat $SNAP_DATA/rpki.conf`" +exec $SNAP/sbin/bgpd \ + -f $SNAP_DATA/bgpd.conf \ + --pid_file $SNAP_DATA/bgpd.pid \ + --socket $SNAP_DATA/zsock \ + --vty_socket $SNAP_DATA \ + --moduledir $SNAP/lib/frr/modules $EXTRA_OPTIONS + |