diff options
author | Stefan Richter | 2015-10-25 19:41:18 +0100 |
---|---|---|
committer | Stefan Richter | 2015-10-25 19:41:18 +0100 |
commit | 02db20951565d0f8fbad6cdc8da0982d76dba5ec (patch) | |
tree | 9a9fa889c29dc30213eaeb20854f9e806b078736 | |
parent | f108f262fadc8bfb0be2f70c2e8293b8063ce42a (diff) | |
download | aur-02db20951565d0f8fbad6cdc8da0982d76dba5ec.tar.gz |
install script for pre-install and post-remove actions added
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 5 | ||||
-rw-r--r-- | plusberrypi-shutdown.install | 23 |
3 files changed, 30 insertions, 5 deletions
@@ -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 @@ -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 +} |