diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-04 13:55:15 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-04 13:55:15 +0300 |
commit | 62148bc2c2b49bba41e44c4f9a4783cde68652b1 (patch) | |
tree | 89b0dc199d16fce217520af33406c1ac0dd13221 | |
parent | app.py: pretty print the JSON (diff) | |
download | linux-status-62148bc2c2b49bba41e44c4f9a4783cde68652b1.tar.gz linux-status-62148bc2c2b49bba41e44c4f9a4783cde68652b1.zip |
pacman: call systemctl on (de)installation
Diffstat (limited to '')
-rw-r--r-- | dist/pacman/PKGBUILD | 1 | ||||
-rw-r--r-- | dist/pacman/linux-status.install | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/dist/pacman/PKGBUILD b/dist/pacman/PKGBUILD index a4be308..896c5dc 100644 --- a/dist/pacman/PKGBUILD +++ b/dist/pacman/PKGBUILD @@ -7,6 +7,7 @@ arch=(any) url='https://github.com/egor-tensin/linux-status' license=(MIT) depends=(procps-ng python systemd) +install=linux-status.install source=("$pkgname-$pkgver.tar.gz::$url/archive/master.tar.gz") md5sums=(SKIP) diff --git a/dist/pacman/linux-status.install b/dist/pacman/linux-status.install new file mode 100644 index 0000000..32b9a90 --- /dev/null +++ b/dist/pacman/linux-status.install @@ -0,0 +1,19 @@ +post_install() { + systemctl --system daemon-reload + systemctl --system enable linux-status + systemctl --system start linux-status +} + +pre_remove() { + systemctl --system stop linux-status.service + systemctl --system disable linux-status.service + systemctl --system daemon-reload +} + +pre_upgrade() { + pre_remove "$1" +} + +post_upgrade() { + post_install "$1" +} |