Add a script to restart fixes during the package upgrade #2

Closed
eSh wants to merge 3 commits from restart-scripts into main
Showing only changes of commit ceb889b7b5 - Show all commits

View File

@ -1,6 +1,6 @@
post_upgrade() {
kill $(ps aux | grep '[f]ix-flatpaks-theming\|[f]ix-theming\|[f]ix-tweaked-desktop-files' | awk '{print $2}')
fix-tweaked-desktop-files &
fix-theming &
fix-flatpaks-theming &
killall -r 'fix-(flatpaks-theming|theming|tweaked-desktop-files)'
eSh marked this conversation as resolved Outdated

Here it might be better to use this command instead:

killall -r 'fix-(flatpaks-theming|theming|tweaked-desktop-files)'
Here it might be better to use this command instead: ```bash killall -r 'fix-(flatpaks-theming|theming|tweaked-desktop-files)' ```
sudo -u "$SUDO_USER" setsid -f fix-tweaked-desktop-files
sudo -u "$SUDO_USER" setsid -f fix-theming
sudo -u "$SUDO_USER" setsid -f fix-flatpaks-theming
eSh marked this conversation as resolved Outdated

If the scripts don't work running as root then try running it like this:

sudo -u "$SUDO_USER" fix-tweaked-desktop-files &
sudo -u "$SUDO_USER" fix-theming &
sudo -u "$SUDO_USER" fix-flatpaks-theming &

Maybe it creates a sub-process under pacman and that causes some issues, so in that case its good to try this one too:

sudo -u "$SUDO_USER" setsid -f fix-tweaked-desktop-files
sudo -u "$SUDO_USER" setsid -f fix-theming
sudo -u "$SUDO_USER" setsid -f fix-flatpaks-theming
If the scripts don't work running as root then try running it like this: ```bash sudo -u "$SUDO_USER" fix-tweaked-desktop-files & sudo -u "$SUDO_USER" fix-theming & sudo -u "$SUDO_USER" fix-flatpaks-theming & ``` Maybe it creates a sub-process under pacman and that causes some issues, so in that case its good to try this one too: ```bash sudo -u "$SUDO_USER" setsid -f fix-tweaked-desktop-files sudo -u "$SUDO_USER" setsid -f fix-theming sudo -u "$SUDO_USER" setsid -f fix-flatpaks-theming ```
}