Package alt-customize-branding-backend: Scripts

Post uninstall

if [ $1 -eq 0 ] ; then
            if [ -f /var/lib/alt-customize-branding/alt-customize-branding-settings.ini ] ; then
        previousThemeName=$(awk -F "=" '/ThemeName/ {print $2}' /var/lib/alt-customize-branding/alt-customize-branding-settings.ini)
        echo Previous theme name: $previousThemeName
# Change /etc/sysconfig/grub2 and run
        . shell-config
        shell_config_set /etc/sysconfig/grub2 GRUB_THEME /boot/grub/themes/$previousThemeName/theme.txt
        shell_config_set /etc/sysconfig/grub2 GRUB_BACKGROUND /boot/grub/themes/$previousThemeName/grub.png
        shell_config_set /etc/sysconfig/grub2 GRUB_WALLPAPER /boot/grub/themes/$previousThemeName/grub.png
# generate file "/boot/grub/grub.cfg"
        /usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg
# Change theme name in file 'plymouthd.conf':
        sed -i "s/Theme=.*/Theme=$previousThemeName/" /etc/plymouth/plymouthd.conf
    fi
# Remove directories
#rm -R %_localstatedir/%rname
    if [ -d "/usr/share/design/alt-customize-branding" ]; then
        rm -R /usr/share/design/alt-customize-branding
    fi
    if [ -d "/boot/grub/themes/alt-customize-branding" ]; then
        rm -R /boot/grub/themes/alt-customize-branding
    fi
    if [ -d "/usr/share/plymouth/themes/alt-customize-branding" ]; then
        rm -R /usr/share/plymouth/themes/alt-customize-branding
    fi
    if [ -d "/tmp/alt-customize-branding" ]; then
        rm -R /tmp/alt-customize-branding
    fi
# Toggle/repair alternatives
    alternatives-update
    make-initrd
fi