From a7467300723a91bd97f5b0f6c655cc48aa075c95 Mon Sep 17 00:00:00 2001 From: Sam Macpherson Date: Fri, 29 Nov 2013 23:21:10 +1000 Subject: [PATCH 1/2] added systemd .service file example --- create_ap.service | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 create_ap.service 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 From b5162fe9a49764c86add7fb5a77a63fc2a2da684 Mon Sep 17 00:00:00 2001 From: Sam Macpherson Date: Sat, 30 Nov 2013 00:03:34 +1000 Subject: [PATCH 2/2] updated README to include systemd service usage --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) 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