From 58c2ac077b40a48f663ec146893dc3cc763f1956 Mon Sep 17 00:00:00 2001 From: ray Date: Mon, 17 Feb 2020 18:33:01 +0000 Subject: [PATCH 1/2] reload systemd user daemon --- install.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index cd3cdfa..8c80653 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,5 @@ #!/bin/sh - _user_id=$(id -u) if [ "$_user_id" -eq 0 ] ; then @@ -12,11 +11,11 @@ sudo cp ./notify-updates /usr/local/bin/ sudo cp ./pacman-update-count /usr/local/bin/ sudo cp ./pacman-update-count.* /etc/systemd/system/ +sudo systemctl daemon-reload mkdir -p ~/.config/systemd/user -cp ./update-notifier.* ~/.config/systemd/user - -sudo systemctl daemon-reload +cp ./update-notifier.* ~/.config/systemd/user/ +systemctl --user daemon-reload sudo systemctl enable pacman-update-count.timer sudo systemctl start pacman-update-count.timer From dfa9bb1106a88c210d14e5821f1d2cf8681ed50e Mon Sep 17 00:00:00 2001 From: ray Date: Mon, 17 Feb 2020 18:33:24 +0000 Subject: [PATCH 2/2] add uninstall script --- uninstall.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 uninstall.sh diff --git a/uninstall.sh b/uninstall.sh new file mode 100755 index 0000000..20af9b5 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +_user_id=$(id -u) + +if [ "$_user_id" -eq 0 ] ; then + echo "pacman-update-count.sh: error - must be run as normal user, not root" + exit 1 +fi + +sudo systemctl disable pacman-update-count.timer +sudo systemctl stop pacman-update-count.timer +sudo rm /etc/systemd/system/pacman-update-count.* +sudo systemctl daemon-reload + +systemctl --user disable update-notifier.timer +systemctl --user stop update-notifier.timer +rm ~/.config/systemd/user/update-notifier.* +systemctl --user daemon-reload + +sudo rm /usr/local/bin/notify-updates +sudo rm /usr/local/bin/pacman-update-count