0 Members and 1 Guest are viewing this topic.
#!/bin/bash#----------------------------------------------------------------# Description: Linux Lite Upgrade Script# Authors: Misko_2083, Jerry Bezencon 2015# Website: https://www.linuxliteos.com#----------------------------------------------------------------# Use zenity to execute the passed-in commandrun_command() { stdbuf -oL /bin/bash -c "$1" | stdbuf -oL sed -n -e '/\[*$/ s/^/# /p' -e '/*$/ s/^/# /p' | zenity --progress --title="$2" --pulsate --width=600 --auto-close return $?}# Ensure multi-language supportexport LANG=C# Kill off any package managers that may be runningif [ "$(pidof synaptic)" ]; then sudo killall -9 synaptic else echo ""fiif [ -z "$(pgrep gdebi-gtk)" ]; then echo ""else killall -9 gdebi-gtkfi# Linux Lite default dialog iconic="/usr/share/icons/zenity-llcc.png"# Get list of available updated packageszenity --question --title="Linux Lite Upgrade Utility" --window-icon="/usr/share/icons/zenity-llcc.png" --text="We will now Upgrade your system to Linux Lite 2.2\n\nPlease ensure you are connected to the internet before you start.\n\nAt the end of this upgrade, please reboot and complete the upgrade process.\n\nClick Yes to continue or No to abort."if [ "$?" -ne "0" ]; then exit 0fi# Update packagesx=run_command 'sudo apt-get update \-y' 'Updating package information...'# Erase existing available infosudo dpkg --clear-avail# Create /etc/apt/apt.conf.d/local to leave /etc/issue and /etc/lsb-release defaults (only needed in LL 2.2)x=run_command 'cd /tmp && wget http://repo.linuxliteos.com/upgrade/local && sudo mv local /etc/apt/apt.conf.d/ && sudo chown root:root /etc/apt/apt.conf.d/local && sleep 2' 'Automating default configuration...'# Install new packages, remove obsolete packages, clean upx=run_command 'sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade \-y && sudo apt-get install inxi libreoffice-gnome dmz-cursor-theme file-roller lite-welcome lite-cleaner catfish deja-dup system-config-date light-locker thunar-archive-plugin whiskermenu \-y && sudo apt-get update \-y && sudo apt-get remove xarchiver \-y && sudo apt-get autoremove \-y && sudo apt-get clean' 'Upgrading to Linux Lite 2.2...'# Add new wallpapersx=run_command 'cd /tmp && wget http://repo.linuxliteos.com/upgrade/2.0-2.2/walls-2.2.tar.gz && sudo tar -xvf walls-2.2.tar.gz -C /usr/share/backgrounds/xfce/ && cd /usr/share/backgrounds/xfce/ && sudo chown root:root *.jpg && sudo chown root:root *.png && sleep 2' 'Adding new wallapapers...'# Update plymouth, lsb_release and issue files /etc changesx=run_command 'sudo sed -i "s/Linux Lite 2.0/Linux Lite 2.2/g" /etc/llver && sudo sed -i "s/Linux Lite 2.0/Linux Lite 2.2/g" /etc/lsb-release && sudo sed -i "s/Linux Lite 2.0/Linux Lite 2.2/g" /etc/issue && sleep 2' 'Updating version information...'# /lib/plymouth/themes/ubuntu-text/ changesecho "s/Ubuntu 14.04/Linux Lite 2.2/gs/black=0x2c001e/black=0x000000/gs/white=0xffffff/white=0xffffff/gs/brown=0xff4012/brown=0xffff00/gs/blue=0x988592/blue=0x000000/g" > /tmp/sed_rules.$$x=run_command 'sudo sed -i -f /tmp/sed_rules.$$ /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth && sudo update-initramfs -u' 'Updating boot configuration please wait...'# Update to new login screenx=run_command 'cd /tmp && wget https://github.com/linuxlite/litelogin/archive/master.zip && unzip master.zip && for FILE in index.theme index.html low_contrast_linen.png style.css; do sudo cp /tmp/litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/$FILE /usr/share/lightdm-webkit/themes/linuxlite; done && sudo rm -rf master.zip && sudo rm -rf litelogin-master/ && sleep 2' 'Updating to new login theme...'# Ask to view upgrade log - TO DO# example of log inclusion - x=$( stdbuf -oL /bin/bash \-c '(sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade \-y )' 2>&1 | tee /var/log/llupdates.log |# PROCEED=$(zenity --question --title="$APPNAME Updates" --window-icon=/usr/share/icons/zenity-llcc.png --text="Updates have finished installing.\n\nWould you like to view the $APPNAME Updates log?"; echo $?)# if [ ${PROCEED} -eq 1 ]; then# zenity --info --title="$APPNAME Updates" --window-icon="${INSTALL_ICON}" --text="$APPNAME Updates Complete."# exit;# else# zenity --text-info --ok-label="Quit" --cancel-label="Cancel" --title="Updates Log" --width=700 --height=300 --filename="/var/log/llupdates.log"# fi# exit 0# Reboot dialogue # Credit to xunil: http://bbs.archbang.org/viewtopic.php?id=279title="Select Reboot to complete the System Upgrade"exit_type=`zenity --width="400" --height="220" --title="$title" --list --radiolist --column="Select" \ --column="Exit Type" --column="Description" \ TRUE "Reboot" "Reboot your computer"\ FALSE "Shutdown" "Shutdown your computer"\ FALSE "Cancel" "Continue using your computer" `# User must select a target type (Check if they cancelled)if [ ! "$exit_type" ]; then zenity --error --title="Error" --text="You must make a selection" exitfi# Action to perform by userif [ "$exit_type" = "Reboot" ]then # Do Reboot here sudo shutdown -r now | zenity --progress --percentage=95 --title=Reboot --auto-close --auto-kill --no-cancel --width=300elif [ "$exit_type" = "Shutdown" ]then # Do Shutdown here sudo shutdown -h now | zenity --progress --percentage=95 --title=Shutdown --auto-close --auto-kill --no-cancel --width=300else # Do Cancel here exit 0fi
Quote from: bitsnpcs on February 05, 2015, 12:46:32 PMHello Jerry and misko,the upgrade went smoothly, it took 19 minutes to complete, including checking for updates after completion.All is working correctly with zero errors after upgrade.Brilliant, thank you for responding bitsnpcs
Hello Jerry and misko,the upgrade went smoothly, it took 19 minutes to complete, including checking for updates after completion.All is working correctly with zero errors after upgrade.
Hi Jerry & Misko,Tested on my HP Laptop i5-4500uIncluding re-boot the upgrade took approx 7 mins, the home-upgrade part seemed to be almost instantaneous.All appears to be working fine, tested networking, printing and common apps.Many Thanks... Dave
Misko and Jerry,Just letting you know, I've upgraded my old netbook, using your script, without any problem at all I had installed LL 2.0 early Dec and did not have much on it, only things not important, so I just went for it ( no problem if I messed it up).It took about 45 mins to do it all, including reboot.Everything was there as it was before upgrade.So far, more than impressed and very grateful.So a massive thanks to you both Keith
touch home-upgrade lite-upgrade
#!/bin/bash#----------------------------------------------------------------# Description: Linux Lite Upgrade Script# Authors: Misko_2083, Jerry Bezencon 2015# Website: https://www.linuxliteos.com#----------------------------------------------------------------# Ensure multi-language supportexport LANG=C# Linux Lite default dialog iconic="/usr/share/icons/zenity-llcc.png"# First dialogue boxzenity --question --title="Linux Lite Upgrade Utility" --window-icon="/usr/share/icons/zenity-llcc.png" --text="We will now complete the Upgrade to Linux Lite 2.2\n\nPlease ensure ALL applications are closed.\n\nClick Yes to continue or No to abort." if [ "$?" -eq "0" ];then# Create Backup folders firstmkdir -p /home/$USER/.llupgradebackup/2.0-2.2mkdir -p /etc/skel/.llupgradebackup/2.0-2.2# Copy all original files from /home/user and /etc/skel to their respective backup folders and versions# Backup /home/$USER/ firstcp /home/$USER/.config/xfce4/panel/whiskermenu-1.rc /home/$USER/.llupgradebackup/2.0-2.2cp /home/$USER/.local/share/applications/exo-terminal-emulator.desktop /home/$USER/.llupgradebackup/2.0-2.2cp /home/$USER/.local/share/applications/alacarte-made-2.desktop /home/$USER/.llupgradebackup/2.0-2.2cp /home/$USER/.local/share/applications/alacarte-made-4.desktop /home/$USER/.llupgradebackup/2.0-2.2cp /home/$USER/.local/share/applications/alacarte-made-5.desktop /home/$USER/.llupgradebackup/2.0-2.2cp /home/$USER/.local/share/applications/alacarte-made-6.desktop /home/$USER/.llupgradebackup/2.0-2.2cp /home/$USER/.local/share/applications/alacarte-made-7.desktop /home/$USER/.llupgradebackup/2.0-2.2cp /home/$USER/.config/Thunar/uca.xml /home/$USER/.llupgradebackup/2.0-2.2# Then backup /etc/skel/cp /etc/skel/.config/xfce4/panel/whiskermenu-1.rc /etc/skel/.llupgradebackup/2.0-2.2cp /etc/skel/.local/share/applications/exo-terminal-emulator.desktop /etc/skel/.llupgradebackup/2.0-2.2cp /etc/skel/.local/share/applications/alacarte-made-2.desktop /etc/skel/.llupgradebackup/2.0-2.2cp /etc/skel/.local/share/applications/alacarte-made-4.desktop /etc/skel/.llupgradebackup/2.0-2.2cp /etc/skel/.local/share/applications/alacarte-made-5.desktop /etc/skel/.llupgradebackup/2.0-2.2cp /etc/skel/.local/share/applications/alacarte-made-6.desktop /etc/skel/.llupgradebackup/2.0-2.2cp /etc/skel/.local/share/applications/alacarte-made-7.desktop /etc/skel/.llupgradebackup/2.0-2.2cp /etc/skel/.config/Thunar/uca.xml /etc/skel/.llupgradebackup/2.0-2.2# Set lite-welcome to autostart on first bootln -s /usr/share/applications/lite_welcome.desktop /home/$USER/.config/autostart# Whisker Menu - changes /home/$USER/.config/xfce4/panel/whiskermenu-1.rcsed -i "s/command-lockscreen=xflock4/command-lockscreen=light-locker-command -l/g" /home/$USER/.config/xfce4/panel/whiskermenu-1.rcdbus-send --print-reply --dest=org.xfce.Panel /org/xfce/Panel org.xfce.Panel.Terminate boolean:truecp /home/$USER/.config/xfce4/panel/whiskermenu-1.rc /etc/skel/.config/xfce4/panel/# Change launchers from xdg-open to exo-open - to do (path is /home/$USER/.local/share/applications/)# In 32bit version, file are: exo-terminal-emulator.desktop, alacarte-made-2.desktop, alacarte-made-4.desktop, alacarte-made-5.desktop, alacarte-made-6.desktop# In 64bit version, file are: exo-terminal-emulator.desktop, Thunar.desktop, alacarte-made-2.desktopsed -i "s/Exec=xdg-open/Exec=exo-open/g" /home/$USER/.local/share/applications/exo-terminal-emulator.desktopsed -i "s/Exec=xdg-open/Exec=exo-open/g" /home/$USER/.local/share/applications/alacarte-made-2.desktopsed -i "s/Exec=xdg-open/Exec=exo-open/g" /home/$USER/.local/share/applications/alacarte-made-4.desktopsed -i "s/Exec=xdg-open/Exec=exo-open/g" /home/$USER/.local/share/applications/alacarte-made-5.desktopsed -i "s/Exec=xdg-open/Exec=exo-open/g" /home/$USER/.local/share/applications/alacarte-made-6.desktopcp /home/$USER/.local/share/applications/exo-terminal-emulator.desktop /etc/skel/.local/share/applications/cp /home/$USER/.local/share/applications/alacarte-made-2.desktop /etc/skel/.local/share/applications/cp /home/$USER/.local/share/applications/alacarte-made-4.desktop /etc/skel/.local/share/applications/cp /home/$USER/.local/share/applications/alacarte-made-5.desktop /etc/skel/.local/share/applications/cp /home/$USER/.local/share/applications/alacarte-made-6.desktop /etc/skel/.local/share/applications/# Implement new Create System Report changes - to do (path is /home/$USER/.local/share/applications/)# In 32bit version, file is: alacarte-made-7.desktop# In 64bit version, file is: alacarte-made-8.desktop# Change - Exec=x-terminal-emulator --geometry=95x25 -t "Create System Report" -e /usr/scripts/info ##to## Exec=gksudo /usr/scripts/systemreportmv /home/$USER/.local/share/applications/alacarte-made-7.desktop /home/$USER/.local/share/applications/alacarte-made-7.desktop.backuptouch /home/$USER/.local/share/applications/alacarte-made-7.desktopecho "[Desktop Entry]" > /home/$USER/.local/share/applications/alacarte-made-7.desktopecho "Comment=Create a detailed System Report of your computer" >> /home/$USER/.local/share/applications/alacarte-made-7.desktopecho "Terminal=false" >> /home/$USER/.local/share/applications/alacarte-made-7.desktopecho "Name=Create System Report" >> /home/$USER/.local/share/applications/alacarte-made-7.desktopecho "Exec=gksudo /usr/scripts/systemreport" >> /home/$USER/.local/share/applications/alacarte-made-7.desktopecho "Type=Application" >> /home/$USER/.local/share/applications/alacarte-made-7.desktopecho "Icon=evolution-tasks" >> /home/$USER/.local/share/applications/alacarte-made-7.desktopcp /home/$USER/.local/share/applications/alacarte-made-7.desktop /etc/skel/.local/share/applications/# Add new right click actions to Thunar - to do (path is /home/$USER/.config/Thunar/uca.xml)sed -i '$ d' /home/$USER/.config/Thunar/uca.xmlecho '<action>' >> /home/$USER/.config/Thunar/uca.xmlecho ' <icon>media-optical</icon>' >> /home/$USER/.config/Thunar/uca.xmlecho ' <name>Check MD5SUM</name>' >> /home/$USER/.config/Thunar/uca.xmlecho ' <unique-id>1422219337486382-1</unique-id>' >> /home/$USER/.config/Thunar/uca.xmlecho ' <command>zenity --info --title="Check MD5 for %n" --text="$(md5sum %f)"</command>' >> /home/$USER/.config/Thunar/uca.xmlecho ' <description>Checks the MD5SUM of an image file</description>' >> /home/$USER/.config/Thunar/uca.xmlecho ' <patterns>*.iso;*.ISO;*.img;*.IMG</patterns>' >> /home/$USER/.config/Thunar/uca.xmlecho ' <audio-files/>' >> /home/$USER/.config/Thunar/uca.xmlecho ' <image-files/>' >> /home/$USER/.config/Thunar/uca.xmlecho ' <other-files/>' >> /home/$USER/.config/Thunar/uca.xmlecho ' <text-files/>' >> /home/$USER/.config/Thunar/uca.xmlecho ' <video-files/>' >> /home/$USER/.config/Thunar/uca.xmlecho '</action>' >> /home/$USER/.config/Thunar/uca.xmlecho '</actions>' >> /home/$USER/.config/Thunar/uca.xmlcp /home/$USER/.config/Thunar/uca.xml /etc/skel/.config/Thunar/thunar -q# Clean uprm -rf /home/$USER/.local/share/applications/xarchiver.desktoprm -rf /etc/skel/.local/share/applications/xarchiver.desktop | zenity --progress --title="Upgrade test..." --window-icon="/usr/share/icons/zenity-llcc.png" --text="Please wait whilst the upgrade completes..." --pulsate --width=400 --auto-close --auto-kill if [ "${PIPESTATUS[0]}" -ne "0" ]; then zenity --error \ --title="Error" --text="Upgrades could not be installed." exit 0 fi else exit 0 fi# Ask to view upgrade log - TO DO# example of log inclusion - x=$( stdbuf -oL /bin/bash \-c '(sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade \-y )' 2>&1 | tee /var/log/llupdates.log |# PROCEED=$(zenity --question --title="$APPNAME Updates" --window-icon=/usr/share/icons/zenity-llcc.png --text="Updates have finished installing.\n\nWould you like to view the $APPNAME Updates log?"; echo $?)# if [ ${PROCEED} -eq 1 ]; then# zenity --info --title="$APPNAME Updates" --window-icon="${INSTALL_ICON}" --text="$APPNAME Updates Complete."# exit;# else# zenity --text-info --ok-label="Quit" --cancel-label="Cancel" --title="Updates Log" --width=700 --height=300 --filename="/var/log/llupdates.log"# fi# exit 0# End dialogue PROCEED=$(zenity --info --title="Upgrade Complete" --window-icon=/usr/share/icons/zenity-llcc.png --text="The upgrade has finished.\nYou can start using your computer straight away."; echo $?)if [ ${PROCEED} -eq 1 ]; then zenity --info --title="Upgrade Complete" --window-icon="${INSTALL_ICON}" --text="The upgrade has finished.\nYou can start using your computer straight away" exit;else lite-welcomefiexit 0
#!/bin/bash#----------------------------------------------------------------# Description: Linux Lite Upgrade Script# Authors: Misko_2083, Jerry Bezencon 2015# Website: https://www.linuxliteos.com#----------------------------------------------------------------# Ensure multi-language supportexport LANG=C# Kill off any package managers that may be runningif [ "$(pidof synaptic)" ] then sudo killall -9 synaptic else echo""fiif [ -z "$(pgrep gdebi-gtk)" ]then echo ""else killall -9 gdebi-gtkfi# Linux Lite default dialog iconic="/usr/share/icons/zenity-llcc.png"# Get list of available updated packageszenity --question --title="Linux Lite Upgrade Utility" --window-icon="/usr/share/icons/zenity-llcc.png" --text="We will now Upgrade your system to Linux Lite 2.2\n\nPlease ensure you are connected to the internet before you start.\n\nAt the end of this upgrade, please reboot and complete the upgrade process.\n\nClick Yes to continue or No to abort." if [ "$?" -eq "0" ];thenx=$( stdbuf -oL /bin/bash \-c '(sudo apt-get update \-y )' 2>&1 |stdbuf -oL sed -n -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p'|zenity --progress --title="Updating package information..." --pulsate \--width=600 --auto-close )# Erase existing available infosudo dpkg --clear-avail else exit 0 fi# Create /etc/apt/apt.conf.d/local to leave /etc/issue and /etc/lsb-release defaults (only needed in LL 2.2)x=$( stdbuf -oL /bin/bash \-c '(cd /tmp && wget http://repo.linuxliteos.com/upgrade/local && sudo mv local /etc/apt/apt.conf.d/ && sudo chown root:root /etc/apt/apt.conf.d/local && sleep 2 )' 2>&1 |stdbuf -oL sed -n -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p'|zenity --progress --title="Automating default configuration..." --pulsate \--width=600 --auto-close )# Install new packages, remove obsolete packages, clean upx=$( stdbuf -oL /bin/bash \-c '(sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade \-y && sudo apt-get install inxi libreoffice-gnome dmz-cursor-theme file-roller lite-welcome lite-cleaner catfish deja-dup system-config-date light-locker thunar-archive-plugin whiskermenu \-y && sudo apt-get update \-y && sudo apt-get remove xarchiver \-y && sudo apt-get autoremove \-y && sudo apt-get clean )' 2>&1 |stdbuf -oL sed -n -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p'|zenity --progress --title="Upgrading to Linux Lite 2.2..." --pulsate \--width=600 --auto-close )# Add new wallpapersx=$( stdbuf -oL /bin/bash \-c '(cd /tmp && wget http://repo.linuxliteos.com/upgrade/2.0-2.2/walls-2.2.tar.gz && sudo tar -xvf walls-2.2.tar.gz -C /usr/share/backgrounds/xfce/ && cd /usr/share/backgrounds/xfce/ && sudo chown root:root *.jpg && sudo chown root:root *.png && sleep 2 )' 2>&1 |stdbuf -oL sed -n -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p'|zenity --progress --title="Adding new wallapapers..." --pulsate \--width=600 --auto-close )# Update plymouth, lsb_release and issue files /etc changesx=$( stdbuf -oL /bin/bash \-c '(sudo sed -i "s/Linux Lite 2.0/Linux Lite 2.2/g" /etc/llver && sudo sed -i "s/Linux Lite 2.0/Linux Lite 2.2/g" /etc/lsb-release && sudo sed -i "s/Linux Lite 2.0/Linux Lite 2.2/g" /etc/issue && sleep 2 )' 2>&1 |stdbuf -oL sed -n -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p'|zenity --progress --title="Updating version information..." --pulsate \--width=600 --auto-close )# /lib/plymouth/themes/ubuntu-text/ changesx=$( stdbuf -oL /bin/bash \-c '(sudo sed -i "s/Ubuntu 14.04/Linux Lite 2.2/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth && sudo sed -i "s/black=0x2c001e/black=0x000000/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth && sudo sed -i "s/white=0xffffff/white=0xffffff/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth && sudo sed -i "s/brown=0xff4012/brown=0xffff00/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth && sudo sed -i "s/blue=0x988592/blue=0x000000/g" /lib/plymouth/themes/ubuntu-text/ubuntu-text.plymouth && sudo update-initramfs -u )' 2>&1 |stdbuf -oL sed -n -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p'|zenity --progress --title="Updating boot configuration please wait..." --pulsate \--width=600 --auto-close )# Update to new login screenx=$( stdbuf -oL /bin/bash \-c '(cd /tmp && wget https://github.com/linuxlite/litelogin/archive/master.zip && unzip master.zip && sudo cp /tmp/litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/index.theme /usr/share/lightdm-webkit/themes/linuxlite && sudo cp /tmp/litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/index.html /usr/share/lightdm-webkit/themes/linuxlite && sudo cp /tmp/litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/low_contrast_linen.png /usr/share/lightdm-webkit/themes/linuxlite && sudo cp /tmp/litelogin-master/usr/share/lightdm-webkit/themes/linuxlite/style.css /usr/share/lightdm-webkit/themes/linuxlite && sudo rm -rf master.zip && sudo rm -rf litelogin-master/ && sleep 2 )' 2>&1 |stdbuf -oL sed -n -e '/\[*$/ s/^/# /p' -e '/\*$/ s/^/# /p'|zenity --progress --title="Updating to new login theme..." --pulsate \--width=600 --auto-close )# Ask to view upgrade log - TO DO# example of log inclusion - x=$( stdbuf -oL /bin/bash \-c '(sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade \-y )' 2>&1 | tee /var/log/llupdates.log |# PROCEED=$(zenity --question --title="$APPNAME Updates" --window-icon=/usr/share/icons/zenity-llcc.png --text="Updates have finished installing.\n\nWould you like to view the $APPNAME Updates log?"; echo $?)# if [ ${PROCEED} -eq 1 ]; then# zenity --info --title="$APPNAME Updates" --window-icon="${INSTALL_ICON}" --text="$APPNAME Updates Complete."# exit;# else# zenity --text-info --ok-label="Quit" --cancel-label="Cancel" --title="Updates Log" --width=700 --height=300 --filename="/var/log/llupdates.log"# fi# exit 0# Reboot dialogue # Credit to xunil: http://bbs.archbang.org/viewtopic.php?id=279title="Select Reboot to complete the System Upgrade"exit_type=`zenity --width="400" --height="220" --title="$title" --list --radiolist --column="Select" \ --column="Exit Type" --column="Description" \ TRUE "Reboot" "Reboot your computer"\ FALSE "Shutdown" "Shutdown your computer"\ FALSE "Cancel" "Continue using your computer" `# User must select a target type (Check if they cancelled)if [ ! "$exit_type" ]; then zenity --error --title="Error" --text="You must make a selection" exitfi# Action to perform by userif [ "$exit_type" = "Reboot" ]then # Do Reboot here sudo shutdown -r now | zenity --progress --percentage=95 --title=Reboot --auto-close --auto-kill --no-cancel --width=300elif [ "$exit_type" = "Shutdown" ]then # Do Shutdown here sudo shutdown -h now | zenity --progress --percentage=95 --title=Shutdown --auto-close --auto-kill --no-cancel --width=300else # Do Cancel here exit 0fi
sudo cp lite-upgrade /usr/bin && sudo chmod +x /usr/bin/lite-upgrade