diff --git a/README.md b/README.md index 603df4e..6df58a3 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,14 @@ OR OR 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 diff --git a/create_ap.service b/create_ap.service new file mode 100644 index 0000000..0ea881a --- /dev/null +++ b/create_ap.service @@ -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