summaryrefslogtreecommitdiffstats
path: root/build/rpm_specs
diff options
context:
space:
mode:
Diffstat (limited to 'build/rpm_specs')
-rw-r--r--build/rpm_specs/openstack-tacker-server.service15
-rw-r--r--build/rpm_specs/openstack-tacker.spec17
2 files changed, 26 insertions, 6 deletions
diff --git a/build/rpm_specs/openstack-tacker-server.service b/build/rpm_specs/openstack-tacker-server.service
new file mode 100644
index 00000000..9bf16cd5
--- /dev/null
+++ b/build/rpm_specs/openstack-tacker-server.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=OpenStack Tacker Server
+After=syslog.target network.target
+
+[Service]
+Type=simple
+User=tacker
+ExecStart=/usr/bin/openstack-tacker-server --config-file /usr/share/tacker/tacker-dist.conf --config-file /etc/tacker/tacker.conf --log-file /var/log/tacker/tacker.log
+PrivateTmp=true
+NotifyAccess=all
+KillMode=process
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/build/rpm_specs/openstack-tacker.spec b/build/rpm_specs/openstack-tacker.spec
index 7ed5cbdb..0ec4d518 100644
--- a/build/rpm_specs/openstack-tacker.spec
+++ b/build/rpm_specs/openstack-tacker.spec
@@ -31,7 +31,12 @@ rm requirements.txt
rm -rf %{buildroot}/usr/lib/python2.7/site-packages/tacker/tests
# Move config files from /usr/etc/ to /etc
mv %{buildroot}/usr/etc %{buildroot}
-#install -p -D -m 644 apex/systemd/openstack-tacker.service %{buildroot}%{_unitdir}/openstack-tacker.service
+#remove init script
+rm -fr %{buildroot}/etc/init.d
+
+# Install systemd script
+install -p -D -m 644 openstack-tacker-server.service %{buildroot}%{_unitdir}/openstack-tacker-server.service
+
# Remove egg-info
rm -rf %{buildroot}/usr/lib/python2.7/site-packages/*egg-info
@@ -47,22 +52,22 @@ fi
exit 0
%post
-%systemd_post openstack-tacker
+%systemd_post openstack-tacker-server
%preun
-%systemd_preun openstack-tacker
+%systemd_preun openstack-tacker-server
%postun
-%systemd_postun_with_restart openstack-tacker
+%systemd_postun_with_restart openstack-tacker-server
%files
/usr/bin/tacker-server
/usr/bin/tacker-db-manage
/usr/bin/tacker-rootwrap
-#%{_unitdir}/openstack-tacker.service
+%{_unitdir}/openstack-tacker-server.service
/usr/lib/python2.7/site-packages/tacker/*
+
#%config(noreplace) %attr(-, root, tacker) %{_sysconfdir}/tacker/tacker.conf`
-%{_sysconfdir}/init.d/tacker-server
%{_sysconfdir}/rootwrap.d/tacker.filters
%{_sysconfdir}/tacker/api-paste.ini
%{_sysconfdir}/tacker/policy.json