Update meson build to use ssifbridge config file
Update meson build to install ssifbridge.service config file to
systemd
Signed-off-by: Dung Cao <dung@os.amperecomputing.com>
Change-Id: I7a51ecdc848d7ebabd133bb4474aee4a3551852a
diff --git a/meson.build b/meson.build
index bf8f01d..f9a1793 100644
--- a/meson.build
+++ b/meson.build
@@ -18,6 +18,20 @@
]
+# Configure and install systemd unit files
+systemd = dependency('systemd')
+systemd_system_unit_dir = systemd.get_pkgconfig_variable(
+ 'systemdsystemunitdir',
+ define_variable: ['prefix', get_option('prefix')])
+
+configure_file(
+ copy: true,
+ input: 'ssifbridge.service',
+ install: true,
+ install_dir: systemd_system_unit_dir,
+ output: 'ssifbridge.service'
+)
+
executable('ssifbridged','ssifbridged.cpp',
dependencies: deps,
install: true)
diff --git a/ssifbridge.service b/ssifbridge.service
index 250389a..bdd0962 100644
--- a/ssifbridge.service
+++ b/ssifbridge.service
@@ -1,11 +1,16 @@
[Unit]
-Description=SSIF Bridge Daemon
+Description=Phosphor IPMI SSIF DBus Bridge
+StartLimitBurst=3
+StartLimitIntervalSec=300
[Service]
-Type=dbus
-BusName=org.openbmc.HostIpmi
-ExecStart=/usr/sbin/ssifbridged
-Restart=on-abort
+Restart=always
+RestartSec=10
+TimeoutStartSec=60
+TimeoutStopSec=60
+ExecStart=/usr/bin/ssifbridged
+SyslogIdentifier=ssifbridged
[Install]
WantedBy=multi-user.target
+RequiredBy=
\ No newline at end of file