summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorFirstAirBender2020-03-22 22:54:02 +0000
committerFirstAirBender2020-03-22 22:54:02 +0000
commit062752c99fa74cc247d2702a37703de1c98ded87 (patch)
tree0005fe0ef3758281945f6732f7351c2a68e9577b /PKGBUILD
parent16aba5183e57d4e9814d80e71f0e7c698f3b695d (diff)
downloadaur-062752c99fa74cc247d2702a37703de1c98ded87.tar.gz
Release: $CI_COMMIT_TAG
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD18
1 files changed, 9 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index cb7e7285d59c..8e9c45b5a3ad 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,14 +1,14 @@
# Maintainer: FirstAirBender <noblechuk5 [at] web [dot] de>
pkgname=systemd-removed-services-hook
-pkgver=1.1
-pkgrel=3
-pkgdesc='Notifies you of uninstalled systemd services'
+pkgver=1.3
+pkgrel=1
+pkgdesc='Notifies you of uninstalled systemd services along with the command to disable them'
arch=('any')
url='https://gitlab.com/firstairbender/systemd-removed-services-hook'
license=('Unlicense')
-depends=('pacutils' 'systemd')
-source=()
+makedepends=('pacutils')
+depends=('systemd')
build() {
{
@@ -28,11 +28,11 @@ build() {
cat <<-'EOF'
[Action]
- Description = List of uninstalled services. Clean up if needed:
- When = PostTransaction
+ Description = Systemd commands to disable uninstalled services
+ When = PreTransaction
Depends = systemd
Depends = pacutils
- Exec = /bin/bash -c 'echo; for serv in $(cat); do if systemctl --quiet is-enabled "${serv##*/}" 2> /dev/null || systemctl --quiet --global is-enabled "${serv##*/}" 2> /dev/null; then echo -e "\t► $(pacconf RootDir)$serv"; fi; done'
+ Exec = /bin/bash -c 'echo; cat | while read -r f; do service="${f##*/}"; if [ "${f/*\/system\/*/system}" = "system" ] && systemctl --quiet is-enabled "$service" 2> /dev/null; then echo -e "\t► systemctl disable $service"; elif [ "${f/*\/user\/*/user}" = "user" ] && systemctl --quiet --global is-enabled "$service" 2> /dev/null; then echo -e "\t► systemctl disable --global $service"; fi; done'
NeedsTargets
EOF
@@ -40,5 +40,5 @@ build() {
}
package() {
- install -Dm 644 ./* --target-directory="$pkgdir/$(pacconf HookDir)"
+ install -Dm 0644 ./* --target-directory="$pkgdir/$(pacconf HookDir)"
}