From 714cbbd9c655332bb32d5eb6ae8303b4729e53fd Mon Sep 17 00:00:00 2001 From: Nico Date: Wed, 27 Jul 2016 21:03:01 +0200 Subject: [PATCH 1/3] Made service use a config file by default It is better to edit a config file of a package, rather than a service file. Since the script does provide config file options, we should use them. Its probably worth adding a default/sample config file. --- create_ap.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_ap.service b/create_ap.service index 4b49835..4e8b74f 100644 --- a/create_ap.service +++ b/create_ap.service @@ -4,7 +4,7 @@ After=network.target [Service] Type=simple -ExecStart=/usr/bin/create_ap -n -g 10.0.0.1 wlan0 AccessPointSSID +ExecStart=/usr/bin/create_ap --config /etc/create_ap.conf KillSignal=SIGINT Restart=on-failure RestartSec=5 From 2df7a8cfc512f1038117c7c469988afb6032874d Mon Sep 17 00:00:00 2001 From: Nico Date: Wed, 27 Jul 2016 21:05:14 +0200 Subject: [PATCH 2/3] Create create_ap.conf Default config file for systemd service. --- create_ap.conf | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 create_ap.conf diff --git a/create_ap.conf b/create_ap.conf new file mode 100644 index 0000000..c3ff0eb --- /dev/null +++ b/create_ap.conf @@ -0,0 +1,25 @@ +CHANNEL=default +GATEWAY=10.0.0.1 +WPA_VERSION=1+2 +ETC_HOSTS=0 +DHCP_DNS=gateway +NO_DNS=0 +HIDDEN=0 +ISOLATE_CLIENTS=0 +SHARE_METHOD=none +IEEE80211N=0 +IEEE80211AC=0 +HT_CAPAB=[HT40+] +VHT_CAPAB= +DRIVER=nl80211 +NO_VIRT=0 +COUNTRY= +FREQ_BAND=2.4 +NEW_MACADDR= +DAEMONIZE=0 +NO_HAVEGED=0 +WIFI_IFACE=wlan0 +INTERNET_IFACE= +SSID=AccessPointSSID +PASSPHRASE= +USE_PSK=0 From f044e7e796ae9ab5d998597e8b98ed0ad63eeac2 Mon Sep 17 00:00:00 2001 From: Nico Date: Tue, 2 Aug 2016 10:17:30 +0200 Subject: [PATCH 3/3] Added create_ap.conf to makefile installation --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 5d1bfd8..862f446 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,13 @@ all: install: cp create_ap /usr/bin/create_ap + cp create_ap.conf /etc/create_ap.conf [ ! -d /lib/systemd/system ] || cp create_ap.service /lib/systemd/system mkdir -p /usr/share/bash-completion/completions cp bash_completion /usr/share/bash-completion/completions/create_ap uninstall: rm /usr/bin/create_ap + rm /etc/create_ap.conf [ ! -f /lib/systemd/system/create_ap.service ] || rm /lib/systemd/system/create_ap.service rm /usr/share/bash-completion/completions/create_ap