summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorphiresky2015-09-03 17:43:04 +0200
committerphiresky2015-09-03 17:43:04 +0200
commit987dc8c0459c68316ab7cc88193de5c56d41c591 (patch)
tree7d6702c807bc6860d7e3593f041c9e57ad0cba3a
downloadaur-987dc8c0459c68316ab7cc88193de5c56d41c591.tar.gz
initial commit
-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 00000000000..424d5e2c911
--- /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 00000000000..a549bf38a75
--- /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 00000000000..f514d3e813a
--- /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 00000000000..875180e3500
--- /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