Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect install prefix when installing systemd service file. #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@ include_directories(${PROJECT_BINARY_DIR})

install(TARGETS ibarr DESTINATION bin)

install(FILES ibarr.service DESTINATION /lib/systemd/system)
configure_file(ibarr.service.in ibarr.service)
install(FILES ${CMAKE_BINARY_DIR}/ibarr.service DESTINATION lib/systemd/system)
2 changes: 1 addition & 1 deletion ibarr.service → ibarr.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Description=Nvidia address and route userspace resolution services for Infiniban
Documentation=https://github.com/Melanox/ip2gid/

[Service]
ExecStart=/usr/bin/ibarr
ExecStart=@CMAKE_INSTALL_PREFIX@/bin/ibarr
# Try to restrict it, because it hardly reads and writes files:
PrivateTmp=yes
ProtectHome=yes
Expand Down