mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-12-26 23:26:47 +01:00
Merge pull request #1895 from RaspAP/feat/hostapd-service
Feature: Install hostapd@.service
This commit is contained in:
@@ -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,14 @@ 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
|
||||
_install_status 0
|
||||
}
|
||||
|
||||
# Configure IP forwarding, set IP tables rules, prompt to install RaspAP daemon
|
||||
function _configure_networking() {
|
||||
_install_log "Configuring networking"
|
||||
|
||||
12
installers/hostapd@.service
Normal file
12
installers/hostapd@.service
Normal file
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user