Initial commit.

This commit is contained in:
Eduard Tolosa 2019-03-25 21:09:50 -05:00
parent 4bb1d8f650
commit 0a045c6fee
3 changed files with 35 additions and 0 deletions

13
upcheck Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
if ! command -v checkupdates > /dev/null || ! command -v notify-send > /dev/null ; then
echo "Error: You need to install the pacman-contrib and libnotify packages."
exit
fi
available_updates="$(checkupdates)"
if [[ -n $available_updates ]]; then
notify-send "The following updates are available:" --icon=dialog-information
notify-send "$available_updates"
fi

12
upcheck.service Normal file
View file

@ -0,0 +1,12 @@
[Unit]
Description=Automatically check updates and send notifications via libnotify
After=network-online.target
[Service]
Type=simple
ExecStart=/home/sechacklabs/.local/bin/upcheck
KillMode=process
KillSignal=SIGINT
[Install]
WantedBy=multi-user.target

10
upcheck.timer Normal file
View file

@ -0,0 +1,10 @@
[Unit]
Description=Check for ArchLinux available updates every 1.5 hours.
[Timer]
OnBootSec=10min
OnUnitActiveSec=1h 30min
Unit=upcheck.service
[Install]
WantedBy=timers.target