From 46fd41725308e8abcfed4420162eb1cdf83923a3 Mon Sep 17 00:00:00 2001 From: Moritz Fischer Date: Thu, 4 Jan 2018 11:31:45 -0800 Subject: mpm: systemd: Add a systemd service file for MPM Add a service file to start MPM on bootup via systemd. Signed-off-by: Moritz Fischer --- mpm/systemd/CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 mpm/systemd/CMakeLists.txt (limited to 'mpm/systemd/CMakeLists.txt') diff --git a/mpm/systemd/CMakeLists.txt b/mpm/systemd/CMakeLists.txt new file mode 100644 index 000000000..bd8dded91 --- /dev/null +++ b/mpm/systemd/CMakeLists.txt @@ -0,0 +1,21 @@ +# +# Copyright 2018 Ettus Research, National Instruments Company +# +# SPDX-License-Identifier: GPL-3.0 +# + +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(SYSTEMD "systemd" REQUIRED) + +PKG_GET_VARIABLE(SYSTEMD_SYSTEM_UNITDIR systemd systemdsystemunitdir) +MESSAGE(STATUS "Systemd system unit directory ${SYSTEMD_SYSTEM_UNITDIR}") + +CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/usrp-hwd.service.in + ${CMAKE_CURRENT_BINARY_DIR}/usrp-hwd.service +) + +INSTALL(FILES + ${CMAKE_CURRENT_BINARY_DIR}/usrp-hwd.service + DESTINATION ${SYSTEMD_SYSTEM_UNITDIR} +) -- cgit v1.2.3