summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Richter2015-10-25 19:41:18 +0100
committerStefan Richter2015-10-25 19:41:18 +0100
commit02db20951565d0f8fbad6cdc8da0982d76dba5ec (patch)
tree9a9fa889c29dc30213eaeb20854f9e806b078736
parentf108f262fadc8bfb0be2f70c2e8293b8063ce42a (diff)
downloadaur-02db20951565d0f8fbad6cdc8da0982d76dba5ec.tar.gz
install script for pre-install and post-remove actions added
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD5
-rw-r--r--plusberrypi-shutdown.install23
3 files changed, 30 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 54a90baaf8bd..5b21a43fc42e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,11 @@
# Generated by mksrcinfo v8
-# Sun Oct 25 18:37:41 UTC 2015
+# Sun Oct 25 18:39:14 UTC 2015
pkgbase = plusberrypi-shutdown
pkgdesc = A systemd service for shutting down your PlusberryPi with the power button.
- pkgver = 1.0.1
- pkgrel = 2
+ pkgver = 1.0.2
+ pkgrel = 3
url = http://plusberrypi.com
+ install = plusberrypi-shutdown.install
arch = armv6h
arch = armv7h
license = GPL
diff --git a/PKGBUILD b/PKGBUILD
index 511db34b3764..55b60b91f4da 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,13 @@
# Maintainer: Stefan Richter (sealor) <jdevsr3 googlemail com>
pkgname=plusberrypi-shutdown
-pkgver=1.0.1
-pkgrel=2
+pkgver=1.0.2
+pkgrel=3
pkgdesc="A systemd service for shutting down your PlusberryPi with the power button."
arch=('armv6h' 'armv7h')
url="http://plusberrypi.com"
license=('GPL')
depends=('systemd' 'bash')
+install=plusberrypi-shutdown.install
source=('plusberrypi-shutdown.service' 'plusberrypi-shutdown.sh')
md5sums=('3b61dc69b028543e40ca60ff4b0833e9'
'2bdfcf3411f48b2b6ba4224e6ddeeb12')
diff --git a/plusberrypi-shutdown.install b/plusberrypi-shutdown.install
new file mode 100644
index 000000000000..efc2675f1305
--- /dev/null
+++ b/plusberrypi-shutdown.install
@@ -0,0 +1,23 @@
+post_install() {
+ systemctl daemon-reload
+ systemctl enable plusberrypi-shutdown
+ systemctl start plusberrypi-shutdown
+}
+
+pre_upgrade() {
+ systemctl stop plusberrypi-shutdown
+}
+
+post_upgrade() {
+ systemctl daemon-reload
+ systemctl start plusberrypi-shutdown
+}
+
+pre_remove() {
+ systemctl stop plusberrypi-shutdown
+ systemctl disable plusberrypi-shutdown
+}
+
+post_remove() {
+ systemctl reset-failed plusberrypi-shutdown
+}