26 lines
623 B
Bash
Executable File
26 lines
623 B
Bash
Executable File
#!/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 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/
|
|
systemctl --user 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
|
|
|