summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPavel Odintsov <pavel.odintsov@gmail.com>2016-03-12 15:16:31 +0300
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-03-15 05:59:50 -0700
commitc3ed01999f8cb33fc1dd7f49ef283719b5f829fc (patch)
tree4ee385ed54868d6a02f98b310d624e0c7fcb7f6e
parenteb8ed382bee3e7fcddb08b9a4ede70513e062cb7 (diff)
Add upstart init file for Ubuntu 14.04
-rw-r--r--contrib/ubuntu/gobgpd.conf26
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/ubuntu/gobgpd.conf b/contrib/ubuntu/gobgpd.conf
new file mode 100644
index 00000000..ba1ef826
--- /dev/null
+++ b/contrib/ubuntu/gobgpd.conf
@@ -0,0 +1,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