Skip to content

Commit

Permalink
Install config anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
GreaterFire authored Nov 1, 2017
1 parent bb9f032 commit 19763f3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ if(WIN32)
target_link_libraries(trojan wsock32 ws2_32)
else()
install(TARGETS trojan DESTINATION bin)
if(NOT EXISTS /etc/trojan.json)
configure_file(examples/server.json-example trojan.json COPYONLY)
install(FILES ${CMAKE_BINARY_DIR}/trojan.json DESTINATION /etc)
endif()
configure_file(examples/server.json-example trojan.json COPYONLY)
install(FILES ${CMAKE_BINARY_DIR}/trojan.json DESTINATION /etc)
if(EXISTS /etc/systemd/system)
configure_file(examples/trojan.service-example trojan.service)
install(FILES ${CMAKE_BINARY_DIR}/trojan.service DESTINATION /etc/systemd/system)
Expand Down

0 comments on commit 19763f3

Please sign in to comment.