summaryrefslogtreecommitdiffhomepage
path: root/tools/contrib/ubuntu
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-07-07 13:48:38 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-07-07 20:44:25 +0900
commitc4775c42510d1f1ddd55036dc19e982712fa6a0b (patch)
tree6ec8b61d4338c809e239e3003a2d32d480898e22 /tools/contrib/ubuntu
parentb3079759aa13172fcb548a83da9a9653d8d5fed4 (diff)
follow Standard Go Project Layout
https://github.com/golang-standards/project-layout Now you can see clearly what are private and public library code. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'tools/contrib/ubuntu')
-rw-r--r--tools/contrib/ubuntu/gobgpd.conf26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/contrib/ubuntu/gobgpd.conf b/tools/contrib/ubuntu/gobgpd.conf
new file mode 100644
index 00000000..ba1ef826
--- /dev/null
+++ b/tools/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