Use systemd services to run fixes #4

Merged
tio merged 2 commits from systemd-services into main 2022-09-18 16:04:37 +00:00
5 changed files with 57 additions and 2 deletions
Showing only changes of commit 8258eaf1d1 - Show all commits

View File

@ -1,6 +1,6 @@
# Maintainer: TROM <contact@tromsite.com> # Maintainer: TROM <contact@tromsite.com>
pkgname=tromjaro-fixes pkgname=tromjaro-fixes
pkgver=1.1.1 pkgver=1.2.0
pkgrel=1 pkgrel=1
pkgdesc="Various fixes for TROMjaro OS" pkgdesc="Various fixes for TROMjaro OS"
arch=(any) arch=(any)
@ -12,9 +12,10 @@ depends=('xfce4-appfinder'
provides=('tromjaro-fixes') provides=('tromjaro-fixes')
backup=() backup=()
options=(!strip) options=(!strip)
install='fixes-package.install'
prepare() { prepare() {
cp -R ../bin ../flatpak-overrides ../alpm-hooks . cp -R ../bin ../flatpak-overrides ../alpm-hooks ../systemd .
} }
package() { package() {
@ -30,4 +31,8 @@ package() {
# copy flatpak overrides # copy flatpak overrides
install -d ${pkgdir}/var/lib/flatpak/overrides install -d ${pkgdir}/var/lib/flatpak/overrides
install -Dm644 ${srcdir}/flatpak-overrides/* ${pkgdir}/var/lib/flatpak/overrides install -Dm644 ${srcdir}/flatpak-overrides/* ${pkgdir}/var/lib/flatpak/overrides
# copy systemd units
install -d ${pkgdir}/usr/lib/systemd/user
install -Dm644 ${srcdir}/systemd/services/* ${pkgdir}/usr/lib/systemd/user
} }

14
fixes-package.install Normal file
View File

@ -0,0 +1,14 @@
post_install() {
find /usr/lib/systemd/user/ -name "fix-*.service" -type f -printf "%f\0" | xargs -0 systemctl --global enable
echo "Warning: A restart is required to take effect"
}
post_upgrade() {
find /usr/lib/systemd/user/ -name "fix-*.service" -type f -printf "%f\0" | xargs -0 systemctl --global enable
echo "Warning: A restart is required to take effect"
}
pre_remove() {
find /usr/lib/systemd/user/ -name "fix-*.service" -type f -printf "%f\0" | xargs -0 systemctl --global disable
echo "Warning: A restart is required to take effect"
}

View File

@ -0,0 +1,12 @@
# This service unit is for fix-flatpaks-theming script
#
[Unit]
Description=Fix flatpak theming script
[Service]
Type=simple
ExecStart=/usr/bin/fix-flatpaks-theming
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,12 @@
# This service unit is for fix-theming script
#
[Unit]
Description=Fix theming script
[Service]
Type=simple
ExecStart=/usr/bin/fix-theming
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,12 @@
# This service unit is for fix-tweaked-desktop-files script
#
[Unit]
Description=Fix tweaked desktop files script
[Service]
Type=simple
ExecStart=/usr/bin/fix-tweaked-desktop-files
[Install]
WantedBy=multi-user.target