replaced hook with timer
This commit is contained in:
parent
12a20e5e74
commit
7a32ec0416
13
PKGBUILD
13
PKGBUILD
|
@ -18,6 +18,15 @@ package() {
|
||||||
install -dm755 $pkgdir/usr/bin
|
install -dm755 $pkgdir/usr/bin
|
||||||
cp -r $srcdir/$pkgname/bin $pkgdir/usr
|
cp -r $srcdir/$pkgname/bin $pkgdir/usr
|
||||||
chmod a+x $pkgdir/usr/bin/*
|
chmod a+x $pkgdir/usr/bin/*
|
||||||
install -dm755 "$pkgdir"/usr/share/libalpm/hooks/
|
install -dm755 "$pkgdir"/usr/lib/systemd/system/
|
||||||
install -m644 $srcdir/$pkgname/fuzzy-pkg-finder.hook "$pkgdir"/usr/share/libalpm/hooks/
|
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
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Sync files database
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
User=root
|
||||||
|
ExeccStart=/usr/bin/sh -c 'pacman -Fy && yay -Fy'
|
|
@ -0,0 +1,8 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Periodically sync files database
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnUnitInactiveSec=24hours
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -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
|
|
Loading…
Reference in New Issue