]> git.proxmox.com Git - mirror_frr.git/blob - snapcraft/scripts/staticd-service
snapcraft: Add new staticd to snap package
[mirror_frr.git] / snapcraft / scripts / staticd-service
1 #!/bin/sh
2
3 set -e -x
4
5 if ! [ -e $SNAP_DATA/staticd.conf ]; then
6 if [ -e $SNAP_DATA/zebra.conf ]; then
7 # if we have a zebra.conf, but no staticd conf, then we use
8 # this file as the default config for staticd
9 cp $SNAP_DATA/zebra.conf $SNAP_DATA/staticd.conf
10 else
11 # new config, start with template
12 cp $SNAP/etc/frr/staticd.conf $SNAP_DATA/staticd.conf
13 fi
14 fi
15 exec $SNAP/sbin/staticd \
16 -f $SNAP_DATA/staticd.conf \
17 --pid_file $SNAP_DATA/staticd.pid \
18 --socket $SNAP_DATA/zsock \
19 --vty_socket $SNAP_DATA
20