From ad22fb693b8f275e512096b25e08afe283645b2f Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 10 Jul 2025 12:07:51 -0700 Subject: [PATCH 1/3] Initial commit --- installers/hostapd@.service | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 installers/hostapd@.service diff --git a/installers/hostapd@.service b/installers/hostapd@.service new file mode 100644 index 00000000..89ed5803 --- /dev/null +++ b/installers/hostapd@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Hostapd access point for %i +After=network.target + +[Service] +ExecStart=/usr/sbin/hostapd -P /run/hostapd_%i.pid /etc/hostapd/hostapd-%i.conf +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-failure + +[Install] +WantedBy=multi-user.target + From 780803b0ec1dc6cb84a686f305e0d5ae52852abb Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 10 Jul 2025 12:18:22 -0700 Subject: [PATCH 2/3] Create _install_raspap_hostapd() --- installers/common.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/installers/common.sh b/installers/common.sh index 47db2624..4bb34618 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -51,6 +51,7 @@ function _install_raspap() { _download_latest_files _change_file_ownership _create_hostapd_scripts + _install_raspap_hostapd _create_plugin_scripts _create_lighttpd_scripts _install_lighttpd_configs @@ -777,6 +778,13 @@ function _enable_raspap_daemon() { sudo systemctl enable raspapd.service || _install_status 1 "Failed to enable raspap.service" } +# Install hostapd@.service +function _install_raspap_hostapd() { + _install_log "Installing RaspAP hostapd@.service" + sudo cp $webroot_dir/installers/hostapd@.service /etc/systemd/system/ || _install_status 1 "Unable to copy hostapd@.service file" + sudo systemctl daemon-reload +} + # Configure IP forwarding, set IP tables rules, prompt to install RaspAP daemon function _configure_networking() { _install_log "Configuring networking" From 697c622f76c1f2cca75d267343b1e45a406af2cc Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 10 Jul 2025 22:26:53 -0700 Subject: [PATCH 3/3] Return _install_status 0 --- installers/common.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/installers/common.sh b/installers/common.sh index 4bb34618..28014b61 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -783,6 +783,7 @@ function _install_raspap_hostapd() { _install_log "Installing RaspAP hostapd@.service" sudo cp $webroot_dir/installers/hostapd@.service /etc/systemd/system/ || _install_status 1 "Unable to copy hostapd@.service file" sudo systemctl daemon-reload + _install_status 0 } # Configure IP forwarding, set IP tables rules, prompt to install RaspAP daemon