From 92f1dc4fd59612277c07fa8730c3563123ecb8b7 Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 24 Jan 2022 18:24:42 +0100 Subject: Added systemd service file for daemon --- daemon/CMakeLists.txt | 4 ++++ daemon/hwd.service | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 daemon/hwd.service (limited to 'daemon') diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt index 4a310ec..7fe2fd0 100644 --- a/daemon/CMakeLists.txt +++ b/daemon/CMakeLists.txt @@ -16,3 +16,7 @@ set_target_properties(${PROJECT_NAME} install(TARGETS ${PROJECT_NAME} RUNTIME ) +configure_file(hwd.service hwd.service) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/hwd.service + DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/systemd/system + ) diff --git a/daemon/hwd.service b/daemon/hwd.service new file mode 100644 index 0000000..a48c5a4 --- /dev/null +++ b/daemon/hwd.service @@ -0,0 +1,9 @@ +[Unit] +Description=Daemon for Educational Hardware Simulator +After=network.target + +[Service] +ExecStart=${CMAKE_INSTALL_FULL_BINDIR}/hwd + +[Install] +WantedBy=multi-user.target -- cgit v1.1