blob: ba1ef826a655cf57bd267d4faacbb18618f39e85 (
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
|
description "GoBGP BGP daemon"
author "Pavel Odintsov <pavel.odintsov@gmail.com>"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
# TODO: use path without version number
env DAEMON=/usr/sbin/gobgpd
env CONFIGURATION_FILE=/etc/gobgpd.conf
env DAEMON_OPTIONS="--disable-stdlog --syslog yes"
#expect fork
#respawn
#respawn limit 10 5
#oom never
# Check configuration before start. You could check result in dmesg output:
# gobgp pre-start process (12265) terminated with status 1
pre-start script
$DAEMON --dry-run -f $CONFIGURATION_FILE
if [ $? -ne 0 ]; then
exit $?
fi
end script
exec $DAEMON -f $CONFIGURATION_FILE $DAEMON_OPTIONS
|