Merge pull request #5 from ichpuchtli/systemd-service

Add systemd service
This commit is contained in:
oblique 2013-11-29 12:23:27 -08:00
commit 78adcce380
2 changed files with 23 additions and 0 deletions

View File

@ -33,3 +33,14 @@ OR
OR OR
echo -e "MyAccessPoint\nMyPassPhrase" | ./create_ap -n wlan0 echo -e "MyAccessPoint\nMyPassPhrase" | ./create_ap -n wlan0
## Systemd service
Using the persistent [systemd](https://wiki.archlinux.org/index.php/systemd#Basic_systemctl_usage) service
### Install:
# cp create_ap.service /etc/systemd/system
### Start service immediately:
# systemctl start create_ap
### Start on boot:
# systemctl enable create_ap

12
create_ap.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Create AP Service
[Service]
Type=simple
ExecStart=/usr/bin/bash create_ap -n -g 10.0.0.1 wlan0 AccessPointSSID
KillSignal=SIGINT
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target