File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 4
4
find_package (PkgConfig REQUIRED )
5
5
pkg_check_modules (nl REQUIRED IMPORTED_TARGET libnl-3.0 )
6
6
7
+ configure_file (
8
+ ${CMAKE_CURRENT_SOURCE_DIR} /bpfilter.service.in
9
+ ${CMAKE_BINARY_DIR} /output/usr/lib/systemd/system/bpfilter.service
10
+ @ONLY
11
+ )
12
+
7
13
add_executable (bpfilter
8
14
${CMAKE_CURRENT_SOURCE_DIR} /main.c
9
15
${CMAKE_CURRENT_SOURCE_DIR} /cgen/cgen.h ${CMAKE_CURRENT_SOURCE_DIR} /cgen/cgen.c
@@ -53,3 +59,9 @@ target_link_libraries(bpfilter
53
59
install (TARGETS bpfilter
54
60
DESTINATION ${CMAKE_INSTALL_SBINDIR}
55
61
)
62
+
63
+ message ("${CMAKE_INSTALL_PREFIX} " )
64
+ install (
65
+ FILES ${CMAKE_BINARY_DIR} /output/usr/lib/systemd/system/bpfilter.service
66
+ DESTINATION ${CMAKE_INSTALL_PREFIX} /lib/systemd/system
67
+ )
Original file line number Diff line number Diff line change
1
+ [Unit]
2
+ Description=BPF-based packet filtering framework
3
+
4
+ [Service]
5
+ ExecStart=/usr/sbin/bpfilter --no-nftables --no-iptables
6
+ Restart=on-failure
7
+
8
+ [Install]
9
+ WantedBy=multi-user.target
You can’t perform that action at this time.
0 commit comments