Add systemd service file
Add a systemd service file for eStoraged, so that it starts up
automatically. Now that eStoraged can dynamically look for config
objects and doesn't need a hard-coded device filename, it makes sense to
have a service file in this repo now.
Tested:
Made some corresponding changes to the eStoraged recipe, then verified
that eStoraged automatically starts up on a BMC when included in the
image.
Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: Id701bde62c2ca4206b980660340eec678e062ede
diff --git a/service_files/meson.build b/service_files/meson.build
new file mode 100644
index 0000000..37d6a07
--- /dev/null
+++ b/service_files/meson.build
@@ -0,0 +1,15 @@
+systemd_dep = dependency('systemd')
+
+systemd_system_unitdir = systemd_dep.get_variable(
+ pkgconfig: 'systemdsystemunitdir')
+
+conf_data = configuration_data()
+conf_data.set('BINDIR', get_option('prefix') / get_option('bindir'))
+
+configure_file(
+ configuration: conf_data,
+ input: 'xyz.openbmc_project.eStoraged.service.in',
+ output: 'xyz.openbmc_project.eStoraged.service',
+ install: true,
+ install_dir: systemd_system_unitdir,
+)