summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLudovic Fauvet2019-09-06 02:31:09 +0200
committerLudovic Fauvet2019-09-06 02:31:09 +0200
commit77658a9ecf34364be1bed511c87ab9de9b5ab0e4 (patch)
tree15764c6adc518268c11af987f0b57c2f2cd2fbc7
downloadaur-wowlan-systemd.tar.gz
Initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD17
-rw-r--r--wowlan-systemd.install16
-rw-r--r--wowlan@.service11
5 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..02d3388644af
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = wowlan-systemd
+ pkgdesc = A systemd unit file for enabling Wake-On-WLAN automatically
+ pkgver = 20190906
+ pkgrel = 1
+ install = wowlan-systemd.install
+ arch = any
+ license = MIT
+ depends = iw
+ source = wowlan@.service
+ source = wowlan-systemd.install
+ sha256sums = 84be5eeb4aa70ff97146c0f628984d2799564d5e813c86219798cc8633c746f4
+ sha256sums = c1e5fd009b8905adfeda674e25c34379048e2e968bedcc5be7537a45950d89da
+
+pkgname = wowlan-systemd
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..6c5134b8b9e6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+pkg
+src
+*.tar.xz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..59190a80b498
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,17 @@
+# Maintainer: Ludovic Fauvet <etix at l0cal dot com>
+
+pkgname=wowlan-systemd
+pkgver=20190906
+pkgrel=1
+pkgdesc="A systemd unit file for enabling Wake-On-WLAN automatically"
+arch=('any')
+license=('MIT')
+depends=('iw')
+install=wowlan-systemd.install
+source=('wowlan@.service' 'wowlan-systemd.install')
+
+package() {
+ install -Dm 644 wowlan@.service "${pkgdir}/usr/lib/systemd/system/wowlan@.service"
+}
+sha256sums=('84be5eeb4aa70ff97146c0f628984d2799564d5e813c86219798cc8633c746f4'
+ 'c1e5fd009b8905adfeda674e25c34379048e2e968bedcc5be7537a45950d89da')
diff --git a/wowlan-systemd.install b/wowlan-systemd.install
new file mode 100644
index 000000000000..8aa2baa342ad
--- /dev/null
+++ b/wowlan-systemd.install
@@ -0,0 +1,16 @@
+post_install() {
+ cat <<EOT
+Now you may enable WoWLAN on each boot with:
+
+ systemctl enable wowlan@phy0
+
+If you wish to have WoWLAN enabled once, simply call:
+
+ systemctl start wowlan@phy0
+
+EOT
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/wowlan@.service b/wowlan@.service
new file mode 100644
index 000000000000..b24fc62b749a
--- /dev/null
+++ b/wowlan@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Wake-on-WLAN for %i
+Requires=network.target
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/iw %i wowlan enable magic-packet
+Type=oneshot
+
+[Install]
+WantedBy=multi-user.target