summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-01-24 18:24:42 +0100
committerAki <please@ignore.pl>2022-01-24 18:24:42 +0100
commit92f1dc4fd59612277c07fa8730c3563123ecb8b7 (patch)
tree54f8d92d221319fe74e8ea3d452813d852693085 /daemon
parent7d86b5d6cf215900d821d1066831901adc81ad48 (diff)
downloadhwd-92f1dc4fd59612277c07fa8730c3563123ecb8b7.zip
hwd-92f1dc4fd59612277c07fa8730c3563123ecb8b7.tar.gz
hwd-92f1dc4fd59612277c07fa8730c3563123ecb8b7.tar.bz2
Added systemd service file for daemon
Diffstat (limited to 'daemon')
-rw-r--r--daemon/CMakeLists.txt4
-rw-r--r--daemon/hwd.service9
2 files changed, 13 insertions, 0 deletions
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