summaryrefslogtreecommitdiff
path: root/openstack/usr/share/openstack/openstack-neutron-server
diff options
context:
space:
mode:
Diffstat (limited to 'openstack/usr/share/openstack/openstack-neutron-server')
-rw-r--r--openstack/usr/share/openstack/openstack-neutron-server29
1 files changed, 29 insertions, 0 deletions
diff --git a/openstack/usr/share/openstack/openstack-neutron-server b/openstack/usr/share/openstack/openstack-neutron-server
new file mode 100644
index 00000000..e596b286
--- /dev/null
+++ b/openstack/usr/share/openstack/openstack-neutron-server
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Copyright (C) 2014 Codethink Limited
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+
+
+set -e
+
+# Check if there is a environmet set for neutron-server
+[ -r /etc/default/neutron-server ] && . /etc/default/neutron-server
+
+# Check if a plugin configuration file exists
+[ -r "$NEUTRON_PLUGIN_CONFIG" ] && CONF_ARG="--config-file $NEUTRON_PLUGIN_CONFIG"
+
+# Run neutron-server
+sudo -u neutron /usr/bin/neutron-server -- \
+ --config-file /etc/neutron/neutron.conf
+ --log-file /var/log/neutron/server.log $CONF_ARG &