From e3f26b9784e486db7ec9d5899fc8c85d5f669e24 Mon Sep 17 00:00:00 2001 From: gustavo panizzo Date: Mon, 28 Jul 2014 19:13:19 -0300 Subject: [PATCH] Support to run neutron-server under systemd. Rewritten-From: 88cd13a88a0e1302c6cb748e8992e35345efe2f8 --- trusty/debian/changelog | 1 + trusty/debian/neutron-common.tmpfile | 1 + trusty/debian/neutron-server.init | 6 ++++++ trusty/debian/neutron-server.service | 17 +++++++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 trusty/debian/neutron-common.tmpfile create mode 100644 trusty/debian/neutron-server.service diff --git a/trusty/debian/changelog b/trusty/debian/changelog index 1019329eb..beb6c8149 100644 --- a/trusty/debian/changelog +++ b/trusty/debian/changelog @@ -6,6 +6,7 @@ neutron (2014.2~b1-1) experimental; urgency=medium [ gustavo panizzo ] * New upstream release. + * Support to run neutron under systemd. -- gustavo panizzo Mon, 30 Jun 2014 18:14:04 -0300 diff --git a/trusty/debian/neutron-common.tmpfile b/trusty/debian/neutron-common.tmpfile new file mode 100644 index 000000000..d9a582460 --- /dev/null +++ b/trusty/debian/neutron-common.tmpfile @@ -0,0 +1 @@ +d /run/neutron 0755 neutron neutron - diff --git a/trusty/debian/neutron-server.init b/trusty/debian/neutron-server.init index 741ca4895..a5af3c555 100644 --- a/trusty/debian/neutron-server.init +++ b/trusty/debian/neutron-server.init @@ -125,6 +125,12 @@ restart|force-reload) status) status_of_proc -p $PIDFILE $DAEMON neutron-server && exit 0 || exit $? ;; +systemd-start) + do_start +;; +systemd-stop) + do_stop +;; *) log_action_msg "Usage: /etc/init.d/neutron-server {start|stop|restart|force-reload|status}" exit 1 diff --git a/trusty/debian/neutron-server.service b/trusty/debian/neutron-server.service new file mode 100644 index 000000000..7cfadbcda --- /dev/null +++ b/trusty/debian/neutron-server.service @@ -0,0 +1,17 @@ +[Unit] +Description=OpenStack Networking service - API server +Documentation=http://docs.openstack.org/ +After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service + +[Service] +User=neutron +Group=neutron +ExecStart=/etc/init.d/neutron-server systemd-start +ExecStop=/etc/init.d/neutron-server systemd-stop +PIDFile=/var/run/neutron/neutron-server.pid +Restart=on-failure +Type=forking + +[Install] +WantedBy=multi-user.target + -- 2.45.2