init
This commit is contained in:
2
Makefile
Normal file
2
Makefile
Normal file
@@ -0,0 +1,2 @@
|
||||
build:
|
||||
tar cf update-notifier.tar update-notifier update-notifier.service update-notifier.timer
|
||||
16
PKGBUILD
Normal file
16
PKGBUILD
Normal file
@@ -0,0 +1,16 @@
|
||||
pkgname=update-notifier
|
||||
pkgver=1.0.2
|
||||
pkgrel=3
|
||||
pkgdesc="notifies when updates are available via checkupdates"
|
||||
arch=('x86_64')
|
||||
depends=('pacman-contrib')
|
||||
url=''
|
||||
license=()
|
||||
source=(${pkgname}.tar)
|
||||
package() {
|
||||
install -D "${srcdir}/${pkgname}" "$pkgdir/usr/bin/update-notifier"
|
||||
install -D "${pkgname}.service" "${pkgdir}/usr/lib/systemd/user/${pkgname}.service"
|
||||
install -D "${pkgname}.timer" "${pkgdir}/usr/lib/systemd/user/${pkgname}.timer"
|
||||
}
|
||||
|
||||
sha256sums=('b663e014d5b3baa122e8e91a6eaf781f11e5cb09b83965c2e325d6939d061fc7')
|
||||
8
update-notifier
Executable file
8
update-notifier
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
#export DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:-unix:path=/run/user/${UID}/bus}"
|
||||
#export DISPLAY=:0
|
||||
n=$(checkupdates | wc -l)
|
||||
if [ "$n" != "0" ]; then
|
||||
notify-send "System update" "$n updates available."
|
||||
fi
|
||||
notify-send "hallo"
|
||||
6
update-notifier.service
Normal file
6
update-notifier.service
Normal file
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Check for updates using checkupdates
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/update-notifier
|
||||
10
update-notifier.timer
Normal file
10
update-notifier.timer
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Runs update-notifier periodically
|
||||
|
||||
[Timer]
|
||||
OnBootSec=5min
|
||||
OnUnitActiveSec=3h
|
||||
Unit=update-notifier.Service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user