update-notifier/install.sh

27 lines
593 B
Bash
Raw Normal View History

2020-02-17 15:40:21 +00:00
#!/bin/sh
2020-02-17 16:21:39 +00:00
2020-02-17 15:40:21 +00:00
_user_id=$(id -u)
2020-02-17 16:21:39 +00:00
if [ "$_user_id" -eq 0 ] ; then
echo "pacman-update-count.sh: error - must be run as normal user, not root"
2020-02-17 15:40:21 +00:00
exit 1
fi
2020-02-17 16:21:39 +00:00
sudo cp ./notify-updates /usr/local/bin/
sudo cp ./pacman-update-count /usr/local/bin/
sudo cp ./pacman-update-count.* /etc/systemd/system/
mkdir -p ~/.config/systemd/user
cp ./update-notifier.* ~/.config/systemd/user
sudo systemctl daemon-reload
sudo systemctl enable pacman-update-count.timer
sudo systemctl start pacman-update-count.timer
systemctl --user enable update-notifier.timer
systemctl --user start update-notifier.timer