diff options
author | Oleksii Vilchanskyi | 2017-07-28 18:26:33 +0200 |
---|---|---|
committer | Oleksii Vilchanskyi | 2017-07-28 18:26:33 +0200 |
commit | 667c0407493d35eae953cdc6add4412a1370d962 (patch) | |
tree | 0a03e20915c5b5f0f136e68d7fa5c0c469b32137 | |
parent | 6ab3e81dbdfeef27147c0a24c350b90906c410ab (diff) | |
download | aur-667c0407493d35eae953cdc6add4412a1370d962.tar.gz |
Provide [pre|post]-[install|upgrade|remove] funcs
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rwxr-xr-x | ckb-next.install | 37 |
3 files changed, 30 insertions, 11 deletions
@@ -1,7 +1,7 @@ pkgbase = ckb-next pkgdesc = Corsair Keyboard and Mouse Input Driver, release version pkgver = 0.2.8 - pkgrel = 2 + pkgrel = 3 url = https://github.com/mattanger/ckb-next install = ckb-next.install arch = i686 @@ -2,7 +2,7 @@ pkgname=ckb-next pkgver=0.2.8 -pkgrel=2 +pkgrel=3 pkgdesc="Corsair Keyboard and Mouse Input Driver, release version" arch=('i686' 'x86_64') url="https://github.com/mattanger/ckb-next" diff --git a/ckb-next.install b/ckb-next.install index c82a406d0563..31029d6523d9 100755 --- a/ckb-next.install +++ b/ckb-next.install @@ -12,17 +12,36 @@ bold="${all_off}$(tput bold)" blue="${bold}$(tput setaf 4)" yellow="${bold}$(tput setaf 3)" +# arg 1: the new package version post_install() { - echo -e "==================================================" - note "To start the daemon automatically, you must execute:" - note "sudo systemctl start ckb-daemon" - note "sudo systemctl enable ckb-daemon" - echo -e '\n' - note "Further information:" - note "https://github.com/mattanger/ckb-next" - echo -e "==================================================" + msg_blue "Starting and enabling ckb-next daemon..." + systemctl daemon-reload + systemctl start ckb-daemon + systemctl enable ckb-daemon } +# arg 1: the new package version +# arg 2: the old package version +pre_upgrade() { + msg_blue "Terminating ckb-next daemon..." + systemctl daemon-reload + systemctl stop ckb-daemon + systemctl disable ckb-daemon +} + +# arg 1: the new package version +# arg 2: the old package version post_upgrade() { - post_install + msg_blue "Starting and enabling ckb-next daemon..." + systemctl daemon-reload + systemctl start ckb-daemon + systemctl enable ckb-daemon +} + +# arg 1: the old package version +pre_remove() { + msg_blue "Terminating ckb-next daemon..." + systemctl daemon-reload + systemctl stop ckb-daemon + systemctl disable ckb-daemon } |