summaryrefslogtreecommitdiff
path: root/tools/systemd
diff options
context:
space:
mode:
authorwangmenglan <[email protected]>2023-12-04 15:41:02 +0800
committerwangmenglan <[email protected]>2023-12-08 16:51:17 +0800
commit052fc5bb8d6765ac20c2f8ce5dda97750d929dcd (patch)
tree61746aa5a7a2073a955288ea8472e4fb5dddcb13 /tools/systemd
parent0c5df1fe2e8451cb85ee25bf01fb111d15a4ed0f (diff)
support obp dynamic configuration loadingv4.6.63-20231208
Diffstat (limited to 'tools/systemd')
-rw-r--r--tools/systemd/CMakeLists.txt4
-rw-r--r--tools/systemd/mrapm_obp.service.in14
2 files changed, 18 insertions, 0 deletions
diff --git a/tools/systemd/CMakeLists.txt b/tools/systemd/CMakeLists.txt
index 9ecee55..641dafb 100644
--- a/tools/systemd/CMakeLists.txt
+++ b/tools/systemd/CMakeLists.txt
@@ -4,6 +4,7 @@ configure_file(mrzcpd.service.in mrzcpd.service)
configure_file(mrtunnat.service.in mrtunnat.service)
configure_file(mrapm_device.service.in mrapm_device.service)
configure_file(mrapm_stream.service.in mrapm_stream.service)
+configure_file(mrapm_obp.service.in mrapm_obp.service)
install(FILES ${CMAKE_BINARY_DIR}/tools/systemd/mrzcpd_hwdb_setup.service
DESTINATION ${MR_INSTALL_SYSTEM} COMPONENT Program)
@@ -23,3 +24,6 @@ install(FILES ${CMAKE_BINARY_DIR}/tools/systemd/mrapm_device.service
install(FILES ${CMAKE_BINARY_DIR}/tools/systemd/mrapm_stream.service
DESTINATION ${MR_INSTALL_SYSTEM} COMPONENT Program)
+install(FILES ${CMAKE_BINARY_DIR}/tools/systemd/mrapm_obp.service
+ DESTINATION ${MR_INSTALL_SYSTEM} COMPONENT Program)
+
diff --git a/tools/systemd/mrapm_obp.service.in b/tools/systemd/mrapm_obp.service.in
new file mode 100644
index 0000000..34bf70c
--- /dev/null
+++ b/tools/systemd/mrapm_obp.service.in
@@ -0,0 +1,14 @@
+[Unit]
+Description=Marsio APM logwritter(monit_obp)
+After=mrzcpd.service
+Requires=mrzcpd.service
+
+[Service]
+Type=simple
+ExecStart=@MR_INSTALL_PREFIX@/bin/monit_obp --prometheus-client
+RestartSec=10s
+Restart=always
+PrivateTmp=True
+
+[Install]
+WantedBy=multi-user.target