summaryrefslogtreecommitdiffstats
path: root/tools/watchfrr.sh.in
blob: 31279f6db111c1046e500df5c63178865f9ad25b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
#
# This is NOT the init script!  This is the watchfrr start/stop/restart
# command handler, passed to watchfrr with the -s/-r/-k commands.  It is used
# internally by watchfrr to start the protocol daemons with the appropriate
# options.
#
# This script should be installed in  @e_sbindir@/watchfrr.sh

log_success_msg() {
	:
}

log_warning_msg() {
	echo "$@" >&2
	[ -x /usr/bin/logger ] && echo "$@" \
		| /usr/bin/logger -t watchfrr.sh -p daemon.warn
}

log_failure_msg() {
	echo "$@" >&2
	[ -x /usr/bin/logger ] && echo "$@" \
		| /usr/bin/logger -t watchfrr.sh -p daemon.err
}

self="`dirname $0`"
if [ -r "$self/frrcommon.sh" ]; then
	. "$self/frrcommon.sh"
else
	. "@e_sbindir@/frrcommon.sh"
fi

frrcommon_main "$@"