]> git.proxmox.com Git - mirror_frr.git/blob - tools/watchfrr.sh.in
Merge pull request #5381 from donaldsharp/zebra_100_is_no_good
[mirror_frr.git] / tools / watchfrr.sh.in
1 #!/bin/bash
2 #
3 # This is NOT the init script! This is the watchfrr start/stop/restart
4 # command handler, passed to watchfrr with the -s/-r/-k commands. It is used
5 # internally by watchfrr to start the protocol daemons with the appropriate
6 # options.
7 #
8 # This script should be installed in @CFG_SBIN@/watchfrr.sh
9
10 log_success_msg() {
11 :
12 }
13
14 log_warning_msg() {
15 echo "$@" >&2
16 [ -x /usr/bin/logger ] && echo "$@" \
17 | /usr/bin/logger -t watchfrr.sh -p daemon.warn
18 }
19
20 log_failure_msg() {
21 echo "$@" >&2
22 [ -x /usr/bin/logger ] && echo "$@" \
23 | /usr/bin/logger -t watchfrr.sh -p daemon.err
24 }
25
26 self="`dirname $0`"
27 if [ -r "$self/frrcommon.sh" ]; then
28 . "$self/frrcommon.sh"
29 else
30 . "@CFG_SBIN@/frrcommon.sh"
31 fi
32
33 frrcommon_main "$@"