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

Enable integration of components on test+development machines #104

Merged
merged 10 commits into from
Jan 12, 2024
12 changes: 12 additions & 0 deletions src/linux/external/hostap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,16 @@ set(HOSTAPD_BIN
"hostapd daemon binary"
)

install(
FILES ${LIBWPA_CLIENT}
TYPE LIB
)

install(
PROGRAMS
${HOSTAPD_BIN}
DESTINATION
${CMAKE_INSTALL_SBINDIR}
)

add_subdirectory(systemd)
20 changes: 11 additions & 9 deletions src/linux/external/hostap/systemd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/hostapd.conf
${CMAKE_CURRENT_BINARY_DIR}/hostapd.conf)
${CMAKE_CURRENT_SOURCE_DIR}/hostapd.example.conf
${CMAKE_CURRENT_BINARY_DIR}/hostapd.example.conf
)

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/hostapd.service.in
${CMAKE_CURRENT_BINARY_DIR}/hostapd.service
${CMAKE_CURRENT_SOURCE_DIR}/hostapd@.service.in
${CMAKE_CURRENT_BINARY_DIR}/hostapd@.service
)

install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/hostapd.conf
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/hostapd)
${CMAKE_CURRENT_BINARY_DIR}/hostapd.example.conf
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/hostapd
)

install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/hostapd.service
DESTINATION ${CMAKE_INSTALL_LIBDIR}/systemd/system
)
${CMAKE_CURRENT_BINARY_DIR}/hostapd@.service
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/systemd/system
)
12 changes: 0 additions & 12 deletions src/linux/external/hostap/systemd/hostapd.conf

This file was deleted.

20 changes: 20 additions & 0 deletions src/linux/external/hostap/systemd/hostapd.example.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Default hostapd configuration file.
#
# To use this with the provided systemd service unit template [email protected],
# (eg. via 'systemctl enable hostapd@wlan0'), copy this file to
# /etc/hostapd/hostapd-<interface>.conf. For example, to use it with wlan0, copy this file to
# /etc/hostapd/hostapd-wlan0.conf.
#

driver=nl80211
ctrl_interface=${CMAKE_INSTALL_FULL_RUNSTATEDIR}/hostapd
ssid=wificontrollertest
hw_mode=g
channel=1
auth_algs=3
wpa=2
wpa_passphrase=password
wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256 SAE
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
11 changes: 0 additions & 11 deletions src/linux/external/hostap/systemd/hostapd.service.in

This file was deleted.

13 changes: 13 additions & 0 deletions src/linux/external/hostap/systemd/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Hostapd Daemon
Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=forking
Restart=on-failure
ExecStart=${CMAKE_INSTALL_FULL_SBINDIR}/hostapd -B -P ${CMAKE_INSTALL_FULL_RUNSTATEDIR}/hostapd/hostapd-%i.pid -i %i ${CMAKE_INSTALL_FULL_SYSCONFDIR}/hostapd/hostapd-%i.conf
PIDFile=${CMAKE_INSTALL_FULL_RUNSTATEDIR}/hostapd/hostapd-%i.pid

[Install]
WantedBy=default.target
2 changes: 1 addition & 1 deletion src/linux/server/systemd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ configure_file(
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/netremote-server.service
DESTINATION ${CMAKE_INSTALL_LIBDIR}/systemd/system
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/systemd/system
)
Loading