replaced hook with timer

This commit is contained in:
Eric Lay 2020-06-12 15:46:47 -05:00
parent 12a20e5e74
commit 7a32ec0416
4 changed files with 26 additions and 13 deletions

View File

@ -18,6 +18,15 @@ package() {
install -dm755 $pkgdir/usr/bin
cp -r $srcdir/$pkgname/bin $pkgdir/usr
chmod a+x $pkgdir/usr/bin/*
install -dm755 "$pkgdir"/usr/share/libalpm/hooks/
install -m644 $srcdir/$pkgname/fuzzy-pkg-finder.hook "$pkgdir"/usr/share/libalpm/hooks/
install -dm755 "$pkgdir"/usr/lib/systemd/system/
install -m644 $srcdir/$pkgname/fpf.{service,timer} "$pkgdir"/usr/lib/systemd/system/
echo
echo
echo -------------------------------------
echo 'Please start/enable fpf service'
echo 'See git installation instructions'
echo -------------------------------------
echo
echo
}

7
fpf.service Normal file
View File

@ -0,0 +1,7 @@
[Unit]
Description=Sync files database
[Service]
Type=oneshot
User=root
ExeccStart=/usr/bin/sh -c 'pacman -Fy && yay -Fy'

8
fpf.timer Normal file
View File

@ -0,0 +1,8 @@
[Unit]
Description=Periodically sync files database
[Timer]
OnUnitInactiveSec=24hours
[Install]
WantedBy=multi-user.target

View File

@ -1,11 +0,0 @@
[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Target = fuzzy-pkg-finder
[Action]
Description = Syncing file database...
When = PostTransaction
Exec = /bin/sh -c 'pacman -Fy && yay -Fy'
NeedsTargets