Add service file

This service file will start the NVMe manager daemon.

Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: I8952ff7660983a9630910ca6ec6bacdff0697c18
diff --git a/meson.build b/meson.build
index 19506df..a667a69 100644
--- a/meson.build
+++ b/meson.build
@@ -45,3 +45,13 @@
 
 configure_file(output : 'config.h',
                configuration : conf_data)
+
+systemd = dependency('systemd')
+conf_data = configuration_data()
+conf_data.set('bindir', get_option('prefix') / get_option('bindir'))
+configure_file(
+  input: 'xyz.openbmc_project.nvme.manager.service.in',
+  output: 'xyz.openbmc_project.nvme.manager.service',
+  configuration: conf_data,
+  install: true,
+  install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'))
diff --git a/xyz.openbmc_project.nvme.manager.service.in b/xyz.openbmc_project.nvme.manager.service.in
new file mode 100644
index 0000000..3553778
--- /dev/null
+++ b/xyz.openbmc_project.nvme.manager.service.in
@@ -0,0 +1,12 @@
+[Unit]
+Description=NVMe management
+After=nvme_gpio.service xyz.openbmc_project.LED.GroupManager.service
+
+[Service]
+ExecStart=@bindir@/nvme_main
+Type=dbus
+BusName=xyz.openbmc_project.nvme.manager
+SyslogIdentifier=phosphor-nvme
+
+[Install]
+WantedBy=multi-user.target