summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD16
-rw-r--r--wol-systemd.install16
-rw-r--r--wol@.service11
4 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..424d5e2c911d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = wol-systemd
+ pkgdesc = A systemd unit file for enabling Wake-On-LAN automatically
+ pkgver = 20150903
+ pkgrel = 1
+ url = https://bitbucket.org/instarch/wol-systemd
+ install = wol-systemd.install
+ arch = any
+ license = MIT
+ depends = ethtool
+ source = wol@.service
+ source = wol-systemd.install
+ sha1sums = 2fae47e792b954f8e70a2dbe9df56458e65ff75b
+ sha1sums = 7d1c8ce6f187316746e11fc403f469137ad3a6b4
+
+pkgname = wol-systemd
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a549bf38a755
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,16 @@
+pkgname=wol-systemd
+pkgver=20150903
+pkgrel=1
+pkgdesc="A systemd unit file for enabling Wake-On-LAN automatically"
+arch=('any')
+url="https://bitbucket.org/instarch/wol-systemd"
+license=('MIT')
+depends=('ethtool')
+install=wol-systemd.install
+source=('wol@.service' 'wol-systemd.install')
+
+package() {
+ install -Dm 644 wol@.service "${pkgdir}/usr/lib/systemd/system/wol@.service"
+}
+sha1sums=('2fae47e792b954f8e70a2dbe9df56458e65ff75b'
+ '7d1c8ce6f187316746e11fc403f469137ad3a6b4')
diff --git a/wol-systemd.install b/wol-systemd.install
new file mode 100644
index 000000000000..f514d3e813a2
--- /dev/null
+++ b/wol-systemd.install
@@ -0,0 +1,16 @@
+post_install() {
+ cat <<EOT
+Now you may enable WOL on each boot with:
+
+ systemctl enable wol@eth0
+
+If you wish to have WOL enabled once, simply call:
+
+ systemctl start wol@eth0
+
+EOT
+}
+
+post_upgrade() {
+ post_install
+} \ No newline at end of file
diff --git a/wol@.service b/wol@.service
new file mode 100644
index 000000000000..875180e35004
--- /dev/null
+++ b/wol@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Wake-on-LAN for %i
+Requires=network.target
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/ethtool -s %i wol g
+Type=oneshot
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file